Pihole admin page unavailable

For whatever reason when I attempt to pull up the pihole admin page i get an error message either saying the connection was refused or could not connect. I have reinstalled pihole twice on CentOS 7 fresh installs each time and the same issue keeps coming up.

IP is static 192.168.1.5
Gateway: 192.168.1.254

Everything seems to be fine allowances for firewalld are enable for http and dns and selinux is disabled. Not sure what is going on here.

Debug Token: jc5i3srv0y

Your debug log shows lighttpd is not running, and that serves the web page.

*** [ DIAGNOSING ]: Pi-hole processes
[โœ—] dnsmasq daemon is unknown
[โœ—] lighttpd daemon is failed
[โœ“] pihole-FTL daemon is active

*** [ 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.

The debug log didn't report any ports in use (unusual), so please post the output of this command:

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471โ€™

Has the web admin interface ever worked for you with this OS?

Run the following and paste the text output (no need for a screen capture)

sudo netstat

Yes I have had it working before on CentOS.

[root@pihole ~]# sudo netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0     96 pihole.paragon.loca:ssh 192.168.1.101:49946     ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  3      [ ]         DGRAM                    8009     /run/systemd/notify
unix  2      [ ]         DGRAM                    8011     /run/systemd/cgroups-agent
unix  2      [ ]         DGRAM                    11602    /run/systemd/shutdownd
unix  5      [ ]         DGRAM                    8028     /run/systemd/journal/socket
unix  14     [ ]         DGRAM                    8030     /dev/log
unix  2      [ ]         DGRAM                    14011    /var/run/chrony/chronyd.sock
unix  3      [ ]         STREAM     CONNECTED     13152
unix  3      [ ]         STREAM     CONNECTED     21744
unix  3      [ ]         STREAM     CONNECTED     21772
unix  3      [ ]         STREAM     CONNECTED     13153    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     17545
unix  2      [ ]         DGRAM                    12709
unix  3      [ ]         STREAM     CONNECTED     21717
unix  3      [ ]         STREAM     CONNECTED     21769
unix  3      [ ]         STREAM     CONNECTED     17155    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     21768
unix  3      [ ]         STREAM     CONNECTED     21715
unix  3      [ ]         STREAM     CONNECTED     21771
unix  3      [ ]         STREAM     CONNECTED     21714
unix  3      [ ]         STREAM     CONNECTED     21721
unix  3      [ ]         STREAM     CONNECTED     21765
unix  3      [ ]         STREAM     CONNECTED     21720
unix  3      [ ]         STREAM     CONNECTED     21718
unix  3      [ ]         STREAM     CONNECTED     21766
unix  3      [ ]         STREAM     CONNECTED     21724
unix  3      [ ]         STREAM     CONNECTED     21760
unix  3      [ ]         STREAM     CONNECTED     21723
unix  3      [ ]         STREAM     CONNECTED     21763
unix  3      [ ]         STREAM     CONNECTED     21762
unix  3      [ ]         STREAM     CONNECTED     20621
unix  2      [ ]         DGRAM                    63479
unix  3      [ ]         STREAM     CONNECTED     21748
unix  3      [ ]         STREAM     CONNECTED     21711
unix  3      [ ]         STREAM     CONNECTED     17058
unix  3      [ ]         STREAM     CONNECTED     17410
unix  3      [ ]         STREAM     CONNECTED     21747
unix  3      [ ]         STREAM     CONNECTED     17735
unix  3      [ ]         DGRAM                    12054
unix  3      [ ]         STREAM     CONNECTED     21708
unix  3      [ ]         STREAM     CONNECTED     19563    /run/systemd/journal/stdout
unix  2      [ ]         DGRAM                    13164
unix  3      [ ]         STREAM     CONNECTED     21745
unix  3      [ ]         STREAM     CONNECTED     21707
unix  3      [ ]         STREAM     CONNECTED     20568
unix  3      [ ]         STREAM     CONNECTED     17061
unix  3      [ ]         STREAM     CONNECTED     21751
unix  3      [ ]         STREAM     CONNECTED     17292    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     19559    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     17059    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     21750
unix  2      [ ]         DGRAM                    17089
unix  2      [ ]         DGRAM                    17081
unix  3      [ ]         STREAM     CONNECTED     21710
unix  3      [ ]         STREAM     CONNECTED     17062    /run/systemd/journal/stdout
unix  3      [ ]         DGRAM                    12055
unix  3      [ ]         STREAM     CONNECTED     21754
unix  2      [ ]         STREAM     CONNECTED     65590
unix  3      [ ]         STREAM     CONNECTED     21753
unix  3      [ ]         STREAM     CONNECTED     12008
unix  3      [ ]         STREAM     CONNECTED     13082    /run/systemd/journal/stdout
unix  2      [ ]         DGRAM                    21849
unix  3      [ ]         STREAM     CONNECTED     21759
unix  3      [ ]         STREAM     CONNECTED     17073    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     21757
unix  3      [ ]         STREAM     CONNECTED     21756
unix  3      [ ]         STREAM     CONNECTED     17012
unix  3      [ ]         STREAM     CONNECTED     21726
unix  3      [ ]         STREAM     CONNECTED     21700
unix  3      [ ]         STREAM     CONNECTED     17271    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     20431
unix  3      [ ]         STREAM     CONNECTED     16831
unix  3      [ ]         STREAM     CONNECTED     13836    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     14043    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     13989
unix  2      [ ]         DGRAM                    63955
unix  2      [ ]         DGRAM                    21675
unix  2      [ ]         DGRAM                    17724
unix  2      [ ]         DGRAM                    17549
unix  3      [ ]         STREAM     CONNECTED     21704
unix  2      [ ]         DGRAM                    13995
unix  3      [ ]         STREAM     CONNECTED     21703
unix  2      [ ]         DGRAM                    20681
unix  2      [ ]         DGRAM                    17295
unix  3      [ ]         STREAM     CONNECTED     14062    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     17712
unix  3      [ ]         STREAM     CONNECTED     17104
unix  3      [ ]         STREAM     CONNECTED     14041
unix  3      [ ]         STREAM     CONNECTED     17517    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     21701
unix  2      [ ]         DGRAM                    28086
unix  3      [ ]         STREAM     CONNECTED     14042
unix  3      [ ]         STREAM     CONNECTED     16744
unix  3      [ ]         STREAM     CONNECTED     13990    /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     21727
unix  3      [ ]         STREAM     CONNECTED     21735
unix  3      [ ]         STREAM     CONNECTED     21736
unix  3      [ ]         STREAM     CONNECTED     16300
unix  3      [ ]         STREAM     CONNECTED     21729
unix  3      [ ]         STREAM     CONNECTED     21730
unix  2      [ ]         DGRAM                    16298
unix  3      [ ]         STREAM     CONNECTED     16299
unix  3      [ ]         STREAM     CONNECTED     21732
unix  3      [ ]         STREAM     CONNECTED     21733
unix  3      [ ]         STREAM     CONNECTED     18896    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     17261
unix  3      [ ]         STREAM     CONNECTED     21738
unix  3      [ ]         STREAM     CONNECTED     17655    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     21739
unix  3      [ ]         STREAM     CONNECTED     18895
unix  3      [ ]         STREAM     CONNECTED     20951    /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     21741
unix  2      [ ]         DGRAM                    39490
unix  3      [ ]         STREAM     CONNECTED     21742

Just out of curiosity I decided to check on lighttpd

[root@pihole ~]# journalctl |grep lighttpd
Sep 25 15:30:39 pihole.paragon.local lighttpd[973]: 2018-09-25 15:30:39: (configfile.c.1451) pclose "cat external.conf 2>/dev/null"failed: Success
Sep 25 15:30:39 pihole.paragon.local lighttpd[973]: 2018-09-25 15:30:39: (configfile.c.1289) source: /etc/lighttpd/lighttpd.conf line: 94 pos: 1 parser failed somehow near here: (EOL)
Sep 25 15:30:39 pihole.paragon.local systemd[1]: lighttpd.service: main process exited, code=exited, status=255/n/a
Sep 25 15:30:39 pihole.paragon.local systemd[1]: Unit lighttpd.service entered failed state.
Sep 25 15:30:39 pihole.paragon.local systemd[1]: lighttpd.service failed.
Sep 25 15:40:23 pihole.paragon.local systemd[1]: lighttpd.service: main process exited, code=exited, status=255/n/a
Sep 25 15:40:23 pihole.paragon.local lighttpd[1785]: 2018-09-25 15:40:23: (configfile.c.1451) pclose "cat external.conf 2>/dev/null"failed: Success
Sep 25 15:40:23 pihole.paragon.local lighttpd[1785]: 2018-09-25 15:40:23: (configfile.c.1289) source: /etc/lighttpd/lighttpd.conf line: 94 pos: 1 parser failed somehow near here: (EOL)
Sep 25 15:40:23 pihole.paragon.local systemd[1]: Unit lighttpd.service entered failed state.
Sep 25 15:40:23 pihole.paragon.local systemd[1]: lighttpd.service failed.
Sep 25 16:33:58 pihole.paragon.local lighttpd[3902]: 2018-09-25 16:33:58: (configfile.c.1451) pclose "cat external.conf 2>/dev/null"failed: Success
Sep 25 16:33:58 pihole.paragon.local lighttpd[3902]: 2018-09-25 16:33:58: (configfile.c.1289) source: /etc/lighttpd/lighttpd.conf line: 94 pos: 1 parser failed somehow near here: (EOL)
Sep 25 16:33:58 pihole.paragon.local systemd[1]: lighttpd.service: main process exited, code=exited, status=255/n/a
Sep 25 16:33:58 pihole.paragon.local systemd[1]: Unit lighttpd.service entered failed state.
Sep 25 16:33:58 pihole.paragon.local systemd[1]: lighttpd.service failed.

After revewing the journalctl I posted I searched the 'cat external.conf 2>/dev/null' expression and found this thread. Pihole admin unavailable / lighttpd stopped ยท Issue #2391 ยท pi-hole/pi-hole ยท GitHub

Commenting out the last line of /etc/lighttpd/lighttpd.conf corrected the issue. Lighttpd is now running and and the admin portal is up and running. Very strange....

For refence line 93 and 94 of the conf file

# Add user chosen options held in external file
#include_shell "cat external.conf 2>/dev/null"

And my current status of lighttpd

[root@pihole ~]# systemctl status lighttpd
โ— lighttpd.service - Lightning Fast Webserver With Light System Requirements
   Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-09-25 20:17:43 EDT; 4min 1s ago
 Main PID: 4366 (lighttpd)
   CGroup: /system.slice/lighttpd.service
           โ”œโ”€4366 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
           โ”œโ”€4367 /usr/bin/php-cgi
           โ”œโ”€4368 /usr/bin/php-cgi
           โ”œโ”€4369 /usr/bin/php-cgi
           โ”œโ”€4370 /usr/bin/php-cgi
           โ”œโ”€4371 /usr/bin/php-cgi
           โ”œโ”€4372 /usr/bin/php-cgi
           โ”œโ”€4373 /usr/bin/php-cgi
           โ””โ”€4374 /usr/bin/php-cgi

Sep 25 20:17:43 pihole.paragon.local systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Sep 25 20:17:43 pihole.paragon.local systemd[1]: Starting Lightning Fast Webserver With Light System Requirements...
Sep 25 20:18:14 pihole.paragon.local sudo[4380]: lighttpd : TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
1 Like

This has been fixed for next release.

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