Web interface not working but still blocking ads

My Pi-hole server stopped blocking ads i noticed over the last week or so. I tried to update it to the latest version and it failed a few times before i tried to get it repaired and working. Well i got it to update but then the DNS service would just stop after starting it manually every time. I got frustrated and just downloaded a new DietPi image and reloaded the image onto the SD card and reinstalled Pi-hole and got it working (and set it up to a static IP) eventually. This was working as of last night when i did this. This morning my DNS isnt working and come to find out my RP was still set to DHCP and i could not get it to set to Static without DHCP still turning back on. I got set to Static IP finally and rebooted and now i cant reach the web interface but testing out various ad blocking sites, it still seems to be working and it is up to date as of this post. Right now i'm not going to mess with it anymore for fear of breaking it and losing my config again. I cant reach the admin page by IP or by name. Something else for me to try or am i doing something wrong?

Expected Behaviour:

Web interface should be working (it was as of last night)

Actual Behaviour:

Web interface is unreachable, but is still blocking ads as far as i can tell.

Debug Token:

wvaktvepys

Lighttpd is not running. What is the output of sudo service lighttpd status -l

Also, your uBlockOrigin block lists are not compatible with Pi-hole.

● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset:
enabled)
Active: failed (Result: exit-code) since Sun 2018-09-02 17:59:54 B
ST; 10h ago
Process: 1051 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
(code=exited, status=255)
Process: 1014 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.co
nf (code=exited, status=0/SUCCESS)
Main PID: 1051 (code=exited, status=255)

Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Failed with result
'exit-code'.
Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Service hold-off time over,
scheduling restart.
Sep 02 17:59:54 DietPi systemd[1]: Stopped Lighttpd Daemon.
Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Start request repea
ted too quickly.
Sep 02 17:59:54 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Unit entered failed
state.
Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Failed with result
'exit-code'.
Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Start request repea
ted too quickly.
Sep 02 17:59:54 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Sep 02 17:59:54 DietPi systemd[1]: lighttpd.service: Failed with result
'exit-code'.

What's output if you start lighttpd by hand ?

sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

If it does start (by checking web GUI), press CTRL-C couple of times to exit.

deHakkelaar, this is the results. I've tried restarting it too but its always exit=0 code=255 cannot start service, etc.

root@DietPi:~# sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
2018-09-04 00:06:13: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or directory

pi@noads:~ $ sudo stat /var/log/lighttpd/error.log
Access: (0644/-rw-r--r--)  Uid: (   33/www-data)   Gid: (   33/www-data)

Try:

sudo touch /var/log/lighttpd/error.log

sudo chmod 644 /var/log/lighttpd/error.log

sudo chown www-data:www-data /var/log/lighttpd/error.log

sudo service lighttpd restart

sudo service lighttpd status -l

EDIT: maybe first check if containing folder has got correct permissions (750) and ownership (www-data/www-data):

pi@noads:~ $ sudo stat /var/log/lighttpd
Access: (0750/drwxr-x---)  Uid: (   33/www-data)   Gid: (   33/www-data)

Says the file or folder does not exist.

root@DietPi:~# sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
2018-09-04 00:06:13: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or directory
root@DietPi:~# root@DietPi:~# sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
-bash: root@DietPi:~#: command not found
root@DietPi:~# 2018-09-04 00:06:13: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or directory^C
root@DietPi:~# sudo touch /var/log/lighttpd/error.log
touch: cannot touch '/var/log/lighttpd/error.log': No such file or directory
root@DietPi:~#
root@DietPi:~# sudo chmod 644 /var/log/lighttpd/error.log
chmod: cannot access '/var/log/lighttpd/error.log': No such file or directory
root@DietPi:~#
root@DietPi:~# sudo chown www-data:www-data /var/log/lighttpd/error.log
chown: cannot access '/var/log/lighttpd/error.log': No such file or directory
root@DietPi:~#
root@DietPi:~# sudo service lighttpd restart
root@DietPi:~#
root@DietPi:~# sudo service lighttpd status -l
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset:
enabled)
Active: failed (Result: exit-code) since Tue 2018-09-04 00:37:11 B
ST; 6s ago
Process: 16443 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
(code=exited, status=255)
Process: 16433 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.c
onf (code=exited, status=0/SUCCESS)
Main PID: 16443 (code=exited, status=255)

Sep 04 00:37:11 DietPi systemd[1]: lighttpd.service: Unit entered failed
state.
Sep 04 00:37:11 DietPi systemd[1]: lighttpd.service: Failed with result
'exit-code'.
Sep 04 00:37:11 DietPi systemd[1]: lighttpd.service: Service hold-off time over,
scheduling restart.
Sep 04 00:37:11 DietPi systemd[1]: Stopped Lighttpd Daemon.
Sep 04 00:37:11 DietPi systemd[1]: lighttpd.service: Start request repea
ted too quickly.
Sep 04 00:37:11 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Sep 04 00:37:11 DietPi systemd[1]: lighttpd.service: Unit entered failed
state.
Sep 04 00:37:11 DietPi systemd[1]: lighttpd.service: Failed with result
'exit-code'.
root@DietPi:~# sudo stat /var/log/lighttpd
stat: cannot stat '/var/log/lighttpd': No such file or directory
root@DietPi:~# Access: (0750/drwxr-x---) Uid: ( 33/www-data) Gid: ( 33/www-data)
-bash: syntax error near unexpected token `0750/drwxr-x---'

Ok, create the folder first:

sudo mkdir /var/log/lighttpd

sudo chmod -R 644 /var/log/lighttpd

sudo chmod 750 /var/log/lighttpd

sudo chown -R www-data:www-data /var/log/lighttpd

And restart:

sudo service lighttpd restart

sudo service lighttpd status -l

EDIT: sorry, I needed to alter again for correct permissions :wink:

2 Likes

That seemed to have worked as i am able to log into the web interface now. Am i going to have to do this every reboot?

root@DietPi:~# sudo mkdir /var/log/lighttpd
root@DietPi:~#
root@DietPi:~# sudo chmod -R 750 /var/log/lighttpd
root@DietPi:~#
root@DietPi:~# sudo chown -R www-data:www-data /var/log/lighttpd
root@DietPi:~# sudo service lighttpd restart
root@DietPi:~#
root@DietPi:~# sudo service lighttpd status -l
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset:
enabled)
Active: active (running) since Tue 2018-09-04 00:53:18 BST; 949ms
ago
Process: 16772 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.c
onf (code=exited, status=0/SUCCESS)
Main PID: 16782 (lighttpd)
CGroup: /system.slice/lighttpd.service
├─16782 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
├─16795 /usr/bin/php-cgi
├─16796 /usr/bin/php-cgi
├─16797 /usr/bin/php-cgi
├─16798 /usr/bin/php-cgi
└─16799 /usr/bin/php-cgi

Sep 04 00:53:18 DietPi systemd[1]: Starting Lighttpd Daemon...
Sep 04 00:53:18 DietPi systemd[1]: Started Lighttpd Daemon.
root@DietPi:~#

No.
That folders is created reboot persistent.
Bit weird though that the lighttpd installment didnt create that folder.
Cheers!!!

Yea im not sure what happened. I'll follow up if anything else strange happens. Thank you very much.

1 Like

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