Unable to access web dashboard after apt-upgrade

I'm using DietPi as my OS, had a apt-upgrade and after running (I didn't pay enough attention and didn't retain what it was) my pi-hole went down.

Checked system dashboard, unable to access via op address or pi.hole. get a error dns.

Did a pi-hole -r and it showed everything up and running, all green. Yet still cannot access the web interface.

Debug:m3pdnpxvuo

@MichaIng May be able to help.

Edit: Your debug log cuts off at the DHCP discovery section, usually that means there's a bad character in your DHCP configuration.

I also do not see any web server running on port 80. What does sudo systemctl status --full --no-pager lighttpd show?

1 Like

Sudo systemctl status --full --no-pager lighttpd
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/lighttpd.service.d
└─dietpi-process_tool.conf
Active: failed (Result: exit-code) since Fri 2021-07-23 08:13:44 EDT; 3h 19min ago

Jul 23 08:13:44 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Jul 23 08:13:44 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Jul 23 08:13:44 DietPi systemd[1]: Stopped Lighttpd Daemon.
Jul 23 08:13:44 DietPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Jul 23 08:13:44 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jul 23 08:13:44 DietPi systemd[1]: Failed to start Lighttpd Daemon.

Please check a fresh Lighttpd daemon log:

systemctl restart lighttpd
sleep 1
tail -20 /var/log/lighttpd/error.log

dietpi@DietPi:~$ sudo systemctl restart lighttpd
Job for lighttpd.service failed because the control process exited with error code.
See "systemctl status lighttpd.service" and "journalctl -xe" for details.
dietpi@DietPi:~$ sleep 1
dietpi@DietPi:~$ tail -20 /var/log/lighttpd/error.log
tail: cannot open '/var/log/lighttpd/error.log' for reading: Permission denied
dietpi@DietPi:~$ sudo tail -20 /var/log/lighttpd/error.log
dietpi@DietPi:~$ sudo systemctl restart lighttpd
Job for lighttpd.service failed because the control process exited with error code.
See "systemctl status lighttpd.service" and "journalctl -xe" for details.
dietpi@DietPi:~$

tpi@DietPi:~$ sudo systemctl status lighttpd.service
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/lighttpd.service.d
└─dietpi-process_tool.conf
Active: failed (Result: exit-code) since Fri 2021-07-23
11:44:43 EDT; 3min 57s ago
Process: 13354 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)

Jul 23 11:44:43 DietPi systemd[1]: lighttpd.se
rvice: Failed with result 'exit-code'.
Jul 23 11:44:43 DietPi systemd[1]: Failed to s
tart Lighttpd Daemon.
Jul 23 11:44:43 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Jul 23 11:44:43 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Jul 23 11:44:43 DietPi systemd[1]: Stopped Lighttpd Daemon.
Jul 23 11:44:43 DietPi systemd[1]: lighttpd.se
rvice: Start request repeated too quickly.
Jul 23 11:44:43 DietPi systemd[1]: lighttpd.se
rvice: Failed with result 'exit-code'.
Jul 23 11:44:43 DietPi systemd[1]: Failed to s
tart Lighttpd Daemon.
dietpi@DietPi:~$

It outputs to a clean command line. No output.

Sorry didn't that sudo call was already there. Actually the config syntax check fails:

sudo lighttpd -tt -f /etc/lighttpd/lighttpd.conf

dietpi@DietPi:~$ sudo lighttpd -tt -f /etc/lighttpd/lighttpd.conf
2021-07-23 11:58:44: (configfile.c.1328) opening configfile /etc/lighttpd/lighttpd.conf failed: No such file or directory
dietpi@DietPi:~$

What happened to the Lighttpd config?

find /etc/lighttpd
dpkg -l lighttpd

dietpi@DietPi:~$ sudo ls -l /etc/lighttpd
total 12
drwxr-xr-x 2 root root 4096 Dec 6 2020 conf-available
drwxr-xr-x 2 root root 4096 Dec 6 2020 conf-enabled
-rw-r--r-- 1 root root 2053 Mar 23 2020 lighttpd.conf.bak
dietpi@DietPi:~$ dpkg -l lighttpd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-================-============-============================================
ii lighttpd 1.4.53-4+deb10u1 armhf fast webserver with minimal memory footprint
dietpi@DietPi:~$ sudo dpkg -l lighttpd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-================-============-============================================
ii lighttpd 1.4.53-4+deb10u1 armhf fast webserver with minimal memory footprint
dietpi@DietPi:~$
<\code>

dietpi@DietPi:~$ find /etc/lighttpd /etc/lighttpd /etc/lighttpd/conf-enabled /etc/lighttpd/conf-enabled/99-unconfigured.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf /etc/lighttpd/conf-enabled/99-dietpi-pihole.conf /etc/lighttpd/conf-enabled/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/98-dietpi-phpmyadmin.conf /etc/lighttpd/conf-enabled/99-dietpi-nextcloud.conf /etc/lighttpd/conf-enabled/99-dietpi-pihole-block_public_admin.conf /etc/lighttpd/conf-enabled/10-rewrite.conf /etc/lighttpd/conf-available /etc/lighttpd/conf-available/10-rrdtool.conf /etc/lighttpd/conf-available/10-userdir.conf /etc/lighttpd/conf-available/99-unconfigured.conf /etc/lighttpd/conf-available/10-ssl.conf /etc/lighttpd/conf-available/10-no-www.conf /etc/lighttpd/conf-available/90-debian-doc.conf /etc/lighttpd/conf-available/10-status.conf /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-available/99-dietpi-pihole.conf /etc/lighttpd/conf-available/10-sockproxy.conf /etc/lighttpd/conf-available/11-extforward.conf /etc/lighttpd/conf-available/10-flv-streaming.conf /etc/lighttpd/conf-available/10-cgi.conf /etc/lighttpd/conf-available/10-expire.conf /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-available/05-auth.conf /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-available/98-dietpi-phpmyadmin.conf /etc/lighttpd/conf-available/99-dietpi-nextcloud.conf /etc/lighttpd/conf-available/10-usertrack.conf /etc/lighttpd/conf-available/10-simple-vhost.conf /etc/lighttpd/conf-available/99-dietpi-pihole-block_public_admin.conf /etc/lighttpd/conf-available/10-rewrite.conf /etc/lighttpd/conf-available/10-proxy.conf /etc/lighttpd/conf-available/10-evasive.conf /etc/lighttpd/conf-available/10-ssi.conf /etc/lighttpd/conf-available/10-dir-listing.conf /etc/lighttpd/conf-available/README /etc/lighttpd/conf-available/10-evhost.conf /etc/lighttpd/lighttpd.conf.bak dietpi@DietPi:~$ dpkg -l lighttpd Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-================-============-============================================ ii lighttpd 1.4.53-4+deb10u1 armhf fast webserver with minimal memory footprint dietpi@DietPi:~$
sudo mv /etc/lighttpd/lighttpd.conf{.bak,}
sudo systemctl restart lighttpd

Did you choose to reconfigure or repair only when doing pihole -r? In any case strange that the backup has been created but no new config :thinking:.

Only reconfigure, my understanding is that, I'd rather leave it the way it was and see what went wrong than mess with it and never know. So just reconfigured, no new edits or changes.

Commands went through no output.

****Repair ***NOT reconfigure

dietpi@DietPi:~$ sudo mv /etc/lighttpd/lighttpd.conf{.bak,}
dietpi@DietPi:~$ sudo systemctl restart lighttpd
dietpi@DietPi:~$ find /etc/lighttpd
/etc/lighttpd
/etc/lighttpd/conf-enabled
/etc/lighttpd/conf-enabled/99-unconfigured.conf
/etc/lighttpd/conf-enabled/10-fastcgi.conf
/etc/lighttpd/conf-enabled/99-dietpi-pihole.conf
/etc/lighttpd/conf-enabled/15-fastcgi-php.conf
/etc/lighttpd/conf-enabled/98-dietpi-phpmyadmin.conf
/etc/lighttpd/conf-enabled/99-dietpi-nextcloud.conf
/etc/lighttpd/conf-enabled/99-dietpi-pihole-block_public_admin.conf
/etc/lighttpd/conf-enabled/10-rewrite.conf
/etc/lighttpd/lighttpd.conf
/etc/lighttpd/conf-available
/etc/lighttpd/conf-available/10-rrdtool.conf
/etc/lighttpd/conf-available/10-userdir.conf
/etc/lighttpd/conf-available/99-unconfigured.conf
/etc/lighttpd/conf-available/10-ssl.conf
/etc/lighttpd/conf-available/10-no-www.conf
/etc/lighttpd/conf-available/90-debian-doc.conf
/etc/lighttpd/conf-available/10-status.conf
/etc/lighttpd/conf-available/10-fastcgi.conf
/etc/lighttpd/conf-available/99-dietpi-pihole.conf
/etc/lighttpd/conf-available/10-sockproxy.conf
/etc/lighttpd/conf-available/11-extforward.conf
/etc/lighttpd/conf-available/10-flv-streaming.conf
/etc/lighttpd/conf-available/10-cgi.conf
/etc/lighttpd/conf-available/10-expire.conf
/etc/lighttpd/conf-available/15-fastcgi-php.conf
/etc/lighttpd/conf-available/05-auth.conf
/etc/lighttpd/conf-available/10-accesslog.conf
/etc/lighttpd/conf-available/98-dietpi-phpmyadmin.conf
/etc/lighttpd/conf-available/99-dietpi-nextcloud.conf
/etc/lighttpd/conf-available/10-usertrack.conf
/etc/lighttpd/conf-available/10-simple-vhost.conf
/etc/lighttpd/conf-available/99-dietpi-pihole-block_public_admin.conf
/etc/lighttpd/conf-available/10-rewrite.conf
/etc/lighttpd/conf-available/10-proxy.conf
/etc/lighttpd/conf-available/10-evasive.conf
/etc/lighttpd/conf-available/10-ssi.conf
/etc/lighttpd/conf-available/10-dir-listing.conf
/etc/lighttpd/conf-available/README
/etc/lighttpd/conf-available/10-evhost.conf
dietpi@DietPi:~$ dpkg -l lighttpd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version          Architecture Description
+++-==============-================-============-============================================
ii  lighttpd       1.4.53-4+deb10u1 armhf        fast webserver with minimal memory footprint
dietpi@DietPi:~$


And can you access the Pi-hole admin panel again now? Otherwise check again:

systemctl status lighttpd
tail -20 /var/log/lighttpd/error.log

EDIT: Okay that config backup was not created by the Pi-hole installed, as it would then have .orig ending. Also dietpi-software does not create a backup of it but only does a single change to it (the document root). Check whether everything can be accessed again, also Nextcloud and phpMyAdmin, else probably that is a backup from before the DietPi software install and the following would then fix it:

G_SUDO G_CONFIG_INJECT 'server.document-root' 'server.document-root = "/var/www"' /etc/lighttpd/lighttpd.conf
# Required for Nextcloud:
G_SUDO G_CONFIG_INJECT '"mod_access",' '	"mod_access",' /etc/lighttpd/lighttpd.conf '"mod_.+",'
# Required for Pi-hole and Nextcloud:
G_SUDO G_CONFIG_INJECT '"mod_setenv",' '	"mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",'
sudo systemctl restart lighttpd

Yes, I can access the admin panel now. But shows offline red.


dietpi@DietPi:~$ systemctl status lighttpd
● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; disabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/lighttpd.service.d
           └─dietpi-process_tool.conf
   Active: active (running) since Fri 2021-07-23 12:30:41 E
DT; 8min ago
  Process: 26083 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 26088 (lighttpd)
    Tasks: 1 (limit: 2090)
   CGroup: /system.slice/lighttpd.service
           └─26088 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
dietpi@DietPi:~$ tail -20 /var/log/lighttpd/error.log
tail: cannot open '/var/log/lighttpd/error.log' for reading: Permission denied
dietpi@DietPi:~$ sudo tail -20 /var/log/lighttpd/error.log
2021-07-23 12:30:41: (server.c.1464) server started (lighttpd/1.4.53) dietpi@DietPi:~$

Okay so far so good. The other thing is FTL:

sudo systemctl restart pihole-FTL
sudo systemctl status pihole-FTL
sudo tail -20 /var/log/pihole-FTL.log
dietpi@DietPi:~$ sudo systemctl restart pihole-FTL

dietpi@DietPi:~$ sudo systemctl status pihole-FTL
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Fri 2021-07-23 12:46:53 ED
T; 50ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 30618 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Jul 23 12:46:52 DietPi systemd[1]: Starting LSB: pihole-FTL daemon...
Jul 23 12:46:52 DietPi pihole-FTL[30618]: Not running
Jul 23 12:46:52 DietPi su[30636]: (to pihole)
root on none
Jul 23 12:46:52 DietPi su[30636]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jul 23 12:46:53 DietPi pihole-FTL[30618]: FTL started!
Jul 23 12:46:53 DietPi su[30636]: pam_unix(su:session): session closed for user pihole
Jul 23 12:46:53 DietPi systemd[1]: Started LSB: pihole-FTL daemon.
dietpi@DietPi:~$ sudo tail -20 /var/log/pihole-FTL.log
[2021-07-23 12:46:52.992 30638M] Resizing "FTL-domains" from 8192 to (768 * 16) == 12288 (/dev/shm: 2.2MB used, 490.8MB total, FTL uses 2.2MB)
[2021-07-23 12:46:53.033 30638M] Resizing "FTL-queries" from 1376256 to (28672 * 56) == 1605632 (/dev/shm: 2.2MB used, 490.8MB total, FTL uses 2.2MB)
[2021-07-23 12:46:53.091 30638M] Resizing "FTL-queries" from 1605632 to (32768 * 56) == 1835008 (/dev/shm: 2.4MB used, 490.8MB total, FTL uses 2.4MB)
[2021-07-23 12:46:53.104 30638M] Imported 29596 queries from the long-term database
[2021-07-23 12:46:53.105 30638M]  -> Total DNS queries: 29596
[2021-07-23 12:46:53.105 30638M]  -> Cached DNS queries: 15802
[2021-07-23 12:46:53.105 30638M]  -> Forwarded DNS queries: 10095
[2021-07-23 12:46:53.105 30638M]  -> Blocked DNS queries: 3162
[2021-07-23 12:46:53.105 30638M]  -> Unknown DNS queries: 1
[2021-07-23 12:46:53.106 30638M]  -> Unique domains: 765
[2021-07-23 12:46:53.106 30638M]  -> Unique clients: 22
[2021-07-23 12:46:53.106 30638M]  -> Known forward destinations: 5
[2021-07-23 12:46:53.106 30638M] Successfully accessed setupVars.conf
[2021-07-23 12:46:53.111 30640M] PID of FTL process: 30640
[2021-07-23 12:46:53.111 30640/T30641] Listening on port 4711 for incoming IPv4 telnet connections
[2021-07-23 12:46:53.112 30640/T30643] Listening on Unix socket
[2021-07-23 12:46:53.112 30640M] INFO: FTL is running as user pihole (UID 999)
[2021-07-23 12:46:53.113 30640M] Reloading DNS cache
[2021-07-23 12:46:53.114 30640M] Blocking status is disabled
[2021-07-23 12:46:53.114 30640/T30642] Listening on port 4711 for incoming IPv6 telnet connections
dietpi@DietPi:~$

Strange is

active (exited)
code=exited, status=0/SUCCESS

Probably we checked too fast after the restart call, but the log looks good. Does it not show online state in admin panel? Else check again:

sudo systemctl status pihole-FTL
sudo tail -20 /var/log/pihole-FTL.log