Unable to Access Admin Page after Update

Since running a pihole -up followed by an apt dist-update, I am no longer able to access the admin web page. PiHole itself is running correctly, however I am not able to get to the admin page and receive a browser 404. It appears to only be an issue with the webserver part, and started after the unix update.

Current:

  • Pihole: 5.11.3
  • AdminLTE: 5.13
  • FTL: 5.16.1

apt dist-upgrade reported:

  • Upgrade: libqmi-proxy:amd64 (1.28.6-1~20.04.1, 1.30.4-1~ubuntu20.04.1), cloud-init:amd64 (22.2-0ubuntu1~20.04.2, 22.2-0ubuntu1~20.04.3), snapd:amd64 (2.54.3+20.04.1ubuntu0.3, 2.55.5+20.04), ubuntu-advantage-tools:amd64 (27.8~20.04.1, 27.9~20.04.1), libqmi-glib5:amd64 (1.28.6-1~20.04.1, 1.30.4-1~ubuntu20.04.1), libmm-glib0:amd64 (1.16.6-2~20.04.1, 1.18.6-1~ubuntu20.04.1), libmbim-proxy:amd64 (1.24.8-1~20.04, 1.26.2-1~ubuntu20.04.1), modemmanager:amd64 (1.16.6-2~20.04.1, 1.18.6-1~ubuntu20.04.1), libmbim-glib4:amd64 (1.24.8-1~20.04, 1.26.2-1~ubuntu20.04.1)

Steps Taken to Resolve / Notes:

  • Run pihole -r.
  • Restarted lighttpd - service lighttpd restart
  • Restarted pihole-FTL - service pihole-ftl restart
  • Restarted piholedns - pihole restartdns
  • Running lighttpd -v returns: lighttpd/1.4.55 (ssl) - a light and fast webserver
  • Running lighttpd -t returns: 2022-07-10 12:47:37: (server.c.1097) No configuration available. Try using -f option.

In the pihole -d, I do see 2 errors, which is concerning, but I am not sure what they mean [✗] Web interface X-Header: X-Header does not match or could not be retrieved.

Running service lighttpd status -l returns the following:

lighttpd.service - Lighttpd Daemon
     Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2022-07-10 12:47:04 CEST; 9min ago
    Process: 1174772 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
    Process: 1174779 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
   Main PID: 1174779 (code=exited, status=255/EXCEPTION)

Jul 10 12:47:04 docker-host systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/EXCEPTION
Jul 10 12:47:04 docker-host systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jul 10 12:47:04 docker-host systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Jul 10 12:47:04 docker-host systemd[1]: Stopped Lighttpd Daemon.
Jul 10 12:47:04 docker-host systemd[1]: lighttpd.service: Start request repeated too quickly.
Jul 10 12:47:04 docker-host systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jul 10 12:47:04 docker-host systemd[1]: Failed to start Lighttpd Daemon.

Expected Behaviour:

Web admin page should load.

Actual Behaviour:

Browser 404

Debug Token:

https://tricorder.pi-hole.net/tSJL5ARh/

Are you running Pi-hole in Docker or on bare metal?

For one reason or another, it is running on the docker host itself -- not within a container.

You have another service running on port 80, and this prevents our shipped webserver (lighttpd) from binding to that port.

[✗] tcp:0.0.0.0:80 is in use by docker-proxy (https://docs.pi-hole.net/main/prerequisites/#ports)

*** [ DIAGNOSING ]: Dashboard and block page
[✗] Block page X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Server: nginx/1.21.6
Date: Sun, 10 Jul 2022 10:36:37 GMT
Content-Type: text/html
Content-Length: 5949
Last-Modified: Mon, 20 Jun 2022 16:54:25 GMT
Connection: keep-alive
ETag: "62b0a641-173d"
Accept-Ranges: bytes

That is correct, port 80 is in use by something else, but prior to the upgrade(s), Pihole was running on 8081, so if it changed, I would see this as a problem. I can’t confirm, however, whether this stopped working after the pihole update or the ‘apt dist-upgrade’ (because I didnt test it in between).

Either way, can someone remind me how to change the ports (again)?

It is likely that you made the port change to lighttpd in file /etc/lighttpd/lighttpd.conf. This file contains the following warning at the top:

###############################################################################
#     FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE.     #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
#                                                                             #
#              CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE:              #
#                         /etc/lighttpd/external.conf                         #
###############################################################################

A permanent method of changing the lighttpd port (for lighttpd version 1.4.46 or later):

Check your lighttpd version with this command.

lighttpd -v

If that returns 1.4.46 or above, you can overwrite the port from Pi-hole's lighttpd.conf in your external.conf like this:

server.port := 8888

Note that the := operator isn't supported in older versions of lighttpd .

1 Like

Indeed -- If II only read the comments in the .conf file! :neutral_face:

I have made the change in external.conf and all seems to be working again. (and I see that in the past 3 hours a new release has been made, so I will test things out again).

Thanks.

1 Like

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