I can't get Pi-hole to work [Ubuntu 18.04]

Expected Behaviour:

Pi-Hole blocking ads, and admin panel showing up.

Actual Behaviour:

Is installed multiple times using default configuration, but still not working. I still see ads and admin panel isn't showing up at all. I get a connection refused error.

Debug Token:

https://tricorder.pi-hole.net/0kh1iif2dx

Something is happening there as you lighttpd is not starting.
Some DNS queries do seem to have passed through pihole-FTL tho.

Let's find out why lighttpd is failing first and then we'll focus on the DNS

What's the output of sudo systemctl status lighttpd ?

This is the output

lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-10-24 21:17:35 +01; 23min ago
  Process: 1203 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=127)

Oct 24 21:17:35 Nazarick systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 24 21:17:35 Nazarick systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Oct 24 21:17:35 Nazarick systemd[1]: Stopped Lighttpd Daemon.
Oct 24 21:17:35 Nazarick systemd[1]: lighttpd.service: Start request repeated too quickly.
Oct 24 21:17:35 Nazarick systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 24 21:17:35 Nazarick systemd[1]: Failed to start Lighttpd Daemon.

Try sudo apt-get install gamin and then restart lighttpd

I installed that and restarted lighttpd and the webpanel seems to have worked... weird. gamin is supposed to be just an application to monitor files based on the package details I read. Not sure why it worked because of that lol, but at the very least it worked. Thanks.

Now what remains is to see if the ads are going to be blocked, which it doesn't seem to be. I tried going on speedtest.net which is full of ads and they all show.

Ok now let's focus on the DNS.

Do you have Network Manager installed?

which networkmanager

What's the output of sudo systemctl status pihole-FTL ?

1 Like

I don't think I have networkmanager installed. 'which' doesn't output anything.

This is the output for pihole-FTL:

 pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Thu 2019-10-24 21:19:38 +01; 37min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3175 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Oct 24 21:19:37 Nazarick systemd[1]: Starting LSB: pihole-FTL daemon...
Oct 24 21:19:37 Nazarick pihole-FTL[3175]: Not running
Oct 24 21:19:37 Nazarick pihole-FTL[3175]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbol
Oct 24 21:19:37 Nazarick su[3218]: Successful su for pihole by root
Oct 24 21:19:37 Nazarick su[3218]: + ??? root:pihole
Oct 24 21:19:37 Nazarick su[3218]: pam_unix(su:session): session opened for user pihole by (uid=0)
Oct 24 21:19:38 Nazarick pihole-FTL[3175]: FTL started!
Oct 24 21:19:38 Nazarick systemd[1]: Started LSB: pihole-FTL daemon.

I have that question too :smiley:

Why install Gamin if its clearly below one failing and resulting in an exit status code 127 other than zero (zero=no errors):

Above one tests the lighttpd config file for errors before proceeding to actually start up lighttpd:

pi@noads:~ $ man lighttpd
[..]
       -tt     Test the configuration file for syntax errors, load and initialize modules, and exit.
[..]
       -f  configfile
               Load configuration file configfile.

Why not just purge lighttpd and reinstall to restore the config files ?

EDIT: Purging instructions in below posting:

Chek below one:

sudo service network-manager status

Thats seems to be for a "symbol lookup" error.
Doesnt appear to be the same issue as here does it ?

EDIT: Oops ... it seems it is:

I purged and reinstalled lighttpd.

Here's the output for network-manager:

NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-10-24 21:17:35 +01; 52min ago
     Docs: man:NetworkManager(8)
 Main PID: 960 (NetworkManager)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           └─960 /usr/sbin/NetworkManager --no-daemon

Oct 24 21:49:38 Nazarick NetworkManager[960]: <warn>  [1571950178.6327] sup-iface[0x55bb0c9d4240,wlp3s0]: connectio
Oct 24 21:49:38 Nazarick NetworkManager[960]: <info>  [1571950178.6407] device (wlp3s0): supplicant interface state
Oct 24 21:49:38 Nazarick NetworkManager[960]: <info>  [1571950178.7374] device (wlp3s0): supplicant interface state
Oct 24 21:49:39 Nazarick NetworkManager[960]: <info>  [1571950179.5786] device (wlp3s0): supplicant interface state
Oct 24 21:49:39 Nazarick NetworkManager[960]: <info>  [1571950179.7178] device (wlp3s0): supplicant interface state
Oct 24 21:49:39 Nazarick NetworkManager[960]: <info>  [1571950179.8543] device (wlp3s0): supplicant interface state
Oct 24 21:49:40 Nazarick NetworkManager[960]: <info>  [1571950180.0624] device (wlp3s0): supplicant interface state
Oct 24 21:49:40 Nazarick NetworkManager[960]: <info>  [1571950180.1471] device (wlp3s0): supplicant interface state
Oct 24 21:49:45 Nazarick NetworkManager[960]: <info>  [1571950185.1817] policy: set 'Y-FY' (wlp3s0) as default for 
Oct 24 21:49:46 Nazarick NetworkManager[960]: <info>  [1571950186.6438] manager: NetworkManager state is now CONNEC

You dont want two network managers active on your setup:

Can kill network-manager with below:

sudo systemctl disable network-manager

sudo reboot

1 Like

I think it just worked guys. I did a pihole restartdns and it worked. I went to the same website (speedtest.net) and it blocked the ads. I can see the ads blocked on the admin panel as well.

Not sure if this is a bug or I just have to wait a bit, but the earlier the "Queries over last 24 hours" graph was populated, but now it's empty. Even though I can see the queries.

1 Like

Afterwards, you need to run below and select repair to have Pi-hole configure lighttpd:

pihole -r

I already did that. It seems to be working now. Thanks for the help guys

The two graphs might be glitching though but I'm not sure (the queries over the last 24 hours and clients over time)

1 Like

Make shure you refresh browser CTRL-F5 and/or clear browser cache.
And check lighttpd logs for errors when browsing the admin page:

sudo tail -f /var/log/lighttpd/access.log /var/log/lighttpd/error.log

You can check some stats collected with below:

echo '>stats' | nc localhost 4711

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.