Expected Behaviour:
Admin panel should be accessible via web
Actual Behaviour:
Admin panel does not appear when accessed via IP or pi.hole.
Admin panel should be accessible via web
Admin panel does not appear when accessed via IP or pi.hole.
From your debug log - it appears the web server is not active.
INSTALL_WEB_SERVER=false
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=false
*** [ DIAGNOSING ]: Pi-hole processes
[✗] lighttpd daemon is failed
*** [ DIAGNOSING ]: Dashboard and block page
[✗] Block page X-Header: X-Header does not match or could not be retrieved.
[✗] Web interface X-Header: X-Header does not match or could not be retrieved.
*** [ DIAGNOSING ]: contents of /var/log/lighttpd
/var/log/lighttpd does not exist.
Export your Pi-hole settings via the teleporter (web admin GUI > Settings > Teleporter).
Then run pihole -r
and select the reconfigure option. When asked the questions about the webserver, answer yes to all.
@jfb
It was likely an install via dietpi-software
with a different web server. But the X-Header should be set regardless.
@Marc_Laflamme
Is my assumption right, and in case which web server did you install long with Pi-hole?
The debug log shows no web server running.
*** [ DIAGNOSING ]: Ports in use
*:22 dropbear (IPv4)
*:22 dropbear (IPv6)
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[4711] is in use by pihole-FTL
[4711] is in use by pihole-FTL
That will be the issue. Ah, in the debug log, does
[✗] lighttpd daemon is failed
mean that the Lighttpd service is present but failed? Although the logging directory should then be present as well.
@Marc_Laflamme
To cover all possibilities, please paste the output of the following commands:
journalctl -u lighttpd -u apache2 -u nginx
Yes it was all installed from diet-pi and I seem to recall there being a changeover of default webservers a while back (or am I misremembering?). As in diet-pi went from nginx to lighttpd? Or was that never the case? Regardless I only ever used defaults.
The output of the journalctl command is here:
-- Logs begin at Thu 2016-11-03 13:16:43 EDT, end at Fri 2021-10-01 14:40:01 EDT. --
Oct 01 13:47:45 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:47:46 dietpi.skratchnet.local lighttpd[533]: 2021-10-01 13:47:45: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:47:46 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:47:46 dietpi.skratchnet.local lighttpd[541]: 2021-10-01 13:47:46: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:47:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:47:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:47:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:47:47 dietpi.skratchnet.local lighttpd[577]: 2021-10-01 13:47:47: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:47:47 dietpi.skratchnet.local lighttpd[586]: 2021-10-01 13:47:47: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:47:47 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:47:48 dietpi.skratchnet.local lighttpd[594]: 2021-10-01 13:47:48: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:47:48 dietpi.skratchnet.local lighttpd[603]: 2021-10-01 13:47:48: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:47:48 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:47:49 dietpi.skratchnet.local lighttpd[611]: 2021-10-01 13:47:48: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:47:49 dietpi.skratchnet.local lighttpd[620]: 2021-10-01 13:47:49: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:47:49 dietpi.skratchnet.local lighttpd[628]: 2021-10-01 13:47:49: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:47:49 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:47:50 dietpi.skratchnet.local lighttpd[637]: 2021-10-01 13:47:49: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Start request repeated too quickly.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: Failed to start Lighttpd Daemon.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:47:50 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:50:44 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:50:45 dietpi.skratchnet.local lighttpd[790]: 2021-10-01 13:50:44: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:50:45 dietpi.skratchnet.local lighttpd[798]: 2021-10-01 13:50:45: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:50:45 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:50:46 dietpi.skratchnet.local lighttpd[810]: 2021-10-01 13:50:45: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:50:46 dietpi.skratchnet.local lighttpd[819]: 2021-10-01 13:50:46: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:50:46 dietpi.skratchnet.local lighttpd[827]: 2021-10-01 13:50:46: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:50:46 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:50:47 dietpi.skratchnet.local lighttpd[836]: 2021-10-01 13:50:46: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:50:47 dietpi.skratchnet.local lighttpd[844]: 2021-10-01 13:50:47: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:50:47 dietpi.skratchnet.local lighttpd[853]: 2021-10-01 13:50:47: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:50:47 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 13:50:48 dietpi.skratchnet.local lighttpd[861]: 2021-10-01 13:50:48: (server.c.1295) WARNING: unknown config-key:
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 13:50:48 dietpi.skratchnet.local lighttpd[870]: 2021-10-01 13:50:48: (log.c.171) opening errorlog '/var/log/light
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Start request repeated too quickly.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: Failed to start Lighttpd Daemon.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 13:50:48 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 14:00:13 dietpi.skratchnet.local lighttpd[1813]: 2021-10-01 14:00:13: (log.c.171) opening errorlog '/var/log/ligh
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 14:00:13 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 14:00:14 dietpi.skratchnet.local lighttpd[1832]: 2021-10-01 14:00:14: (log.c.171) opening errorlog '/var/log/ligh
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 14:00:14 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 14:00:15 dietpi.skratchnet.local lighttpd[1849]: 2021-10-01 14:00:15: (log.c.171) opening errorlog '/var/log/ligh
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 14:00:15 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 14:00:16 dietpi.skratchnet.local lighttpd[1866]: 2021-10-01 14:00:15: (log.c.171) opening errorlog '/var/log/ligh
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: Starting Lighttpd Daemon...
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: Started Lighttpd Daemon.
Oct 01 14:00:16 dietpi.skratchnet.local lighttpd[1882]: 2021-10-01 14:00:16: (log.c.171) opening errorlog '/var/log/ligh
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: Stopped Lighttpd Daemon.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Start request repeated too quickly.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: Failed to start Lighttpd Daemon.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Unit entered failed state.
Oct 01 14:00:16 dietpi.skratchnet.local systemd[1]: lighttpd.service: Failed with result 'exit-code'.
jfb
Do you still want me to run pihole -r and reconfigure? I'll need to somehow export the settings via cli as I cannot currently get to the web admin.
It seems the logging directory is missing for some reason. Recreate it, then it should work:
mkdir /var/log/lighttpd
chown www-data /var/log/lighttpd
systemctl restart lighttpd
Did you do an unclean shutdown or power loss after Pi-hole/Lighttpd was installed?
We have had a few unplanned power outages recently but nothing during an upgrade.
Recreating the log folder allowed it to start up perfectly. I had no idea a missing log folder would cause it to fail like that. Just not log properly. Thanks!
Is there any other maintenance I should perform according to the resulting logs? I'm also running an old version of diet-pi (I think it's based on Stretch). The only thing I'm running is pi-hole. Are there any issues with upgrading to Bullseye in regards to pi-hole? Or would I be better off exporting the settings and just re-importing after a clean install?
For daemons this is pretty common. Thanks to systemd however it is pretty simple nowadays to have the log directory pre-created, before starting the daemon:
mkdir -p /etc/systemd/system/lighttpd.service.d
echo -e '[Service]\nLogsDirectory=lighttpd' > /etc/systemd/system/lighttpd.service.d/create-logs-dir.conf
systemctl daemon-reload
Due to RAM logging, after a new directory was created in /var/log
, like /var/log/lighttpd
during Lighttpd package install, at least one clean shutdown needs to be done to have the new directory stored on the persistent disk location, which is then restored into the RAM disk at boot.
Awesome, thanks for that! (I haven't gotten to the logging and systemd chapter in my book yet haha).
Does that include a reboot? Or does it need a full shutdown?
A clean reboot will do as well. It's the systemd shutdown sequence, to ordinary stop all services, which is needed and implied on a reboot. Of course it is generally to aim for as it also assures that e.g. database connections are closed gracefully to avoid unintended or corrupted states.
Good to know, thank you.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.