503 Service Not Available

The issue I am facing: When I go to the admin interface I get the error "503 Service Not Available"
i have also tried "sudo systemctl enable php7.0-fpm" but i get the following error " Failed to enable unit: Unit file php7.0-fpm.service does not exist."

What I have changed since installing Pi-hole: i installed the latest update. everything worked fine after that - only today i noticed that i can't reach the admin page.

Please post the token generated by

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

https://tricorder.pi-hole.net/utwouxu7q9
thanks for the help!

Your debug log shows your Pi-hole to have full IPv4 and IPv6 connectivity, and it has also been positively receiving and processing DNS queries recently: (click for details)
*** [ DIAGNOSING ]: contents of /var/log

-rw-r--r-- 1 pihole pihole 12667 Aug 12 11:49 /var/log/pihole-FTL.log
   -----tail of pihole-FTL.log------
   [2020-08-12 11:36:45.575 3150M]  -> Total DNS queries: 37484
   [2020-08-12 11:36:45.575 3150M]  -> Cached DNS queries: 1399
   [2020-08-12 11:36:45.575 3150M]  -> Forwarded DNS queries: 21526
   [2020-08-12 11:36:45.575 3150M]  -> Blocked DNS queries: 14559
   [2020-08-12 11:36:45.575 3150M]  -> Unknown DNS queries: 0
   [2020-08-12 11:36:45.575 3150M]  -> Unique domains: 1693
   [2020-08-12 11:36:45.576 3150M]  -> Unique clients: 2
   [2020-08-12 11:36:45.576 3150M]  -> Known forward destinations: 2
Pi-hole's *lighttpd* webserver also seems operational: (click for details)
*** [ DIAGNOSING ]: Ports in use
*:22 sshd (IPv4)
*:22 sshd (IPv6)
[80] is in use by lighttpd
[80] is in use by lighttpd
[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
*** [ DIAGNOSING ]: Pi-hole processes
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

However, lighttpd seems not to be running in our default configuration - while the dashboard reports ok, its blocking page is inaccessible:

*** [ DIAGNOSING ]: Dashboard and block page
[✗] Block page X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 503 Service Not Available
Content-Type: text/html
Content-Length: 365
Date: Wed, 12 Aug 2020 11:04:46 GMT
Server: lighttpd/1.4.53

[✓] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!

Accordingly, lighttpd shows some errors:

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 55576664 Aug 12 12:04 /var/log/lighttpd/error.log
   2020-08-09 10:59:33: (server.c.1759) logfiles cycled UID = 0 PID = 720 
   2020-08-09 10:59:33: (gw_backend.c.476) unlink /var/run/lighttpd/php.socket-0 after connect failed: Connection refused

Did you perhaps alter your configuration yourself (e.g. by providing a personalised block page or configuring access via HTTPS), or added some mods for Pi-hole or other software?

nothing in that direction. i always left my pi-hole on default and operated it that way.

Run on your Pi-hole machine, what's the output of:

sudo systemctl status --full --no-pager lighttpd

This is what i get:

● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-08-12 11:36:28 BST; 1h 6min ago
 Main PID: 2989 (lighttpd)
    Tasks: 1 (limit: 2200)
   Memory: 3.0M
   CGroup: /system.slice/lighttpd.service
           └─2989 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

Aug 12 12:42:40 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:40 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:42 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:42 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:44 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:44 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:46 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:46 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:48 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference
Aug 12 12:42:48 raspberrypi lighttpd[2989]: /usr/bin/php-cgi: relocation error: /usr/bin/php-cgi: symbol SRL_CTXWset_sesurity_lev%l version OPENSSL_1_1_0 not defined in file libssl.so.1.1 with link time reference

(You can format your output for readability by using the </> Preformatted text menu option. I’ve just done that for you :wink:)

This seems to be a problem with some SSL library, as would be used in HTTPS - while Pi-hole would be using only HTTP by default.

Is there any other software on your Pi-hole machine that uses HTTPS, which maybe upgraded an SSL library also used by Pi-hole?

I have installed everything by default and only added new blocklists and i update my pi-hole when a new version is available. That's all I do with the machine.
It's just really weird that it's not working now. I can't explain it

Let's check some versions
What's the output of:

openssl version
php --version

OpenSSL 1.1.1c 28 May 2019

php seems to have a problem

PHP Warning:  Failed loading Zend extension 'opcache.so' (tried: /usr/lib/php/20180731/opcache.so (/usr/lib/php/20180731/opcache.so: invalid ELF header), /usr/lib/php/20180731/opcache.so.so (/usr/lib/php/20180731/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo.so' (tried: /usr/lib/php/20180731/pdo.so (/usr/lib/php/20180731/pdo.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo.so.so (/usr/lib/php/20180731/pdo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/20180731/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver), /usr/lib/php/20180731/pdo_sqlite.so.so (/usr/lib/php/20180731/pdo_sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

You're likely missing the php-sqlite package.
But without the correct PHP version, I am at a loss which package to recommend for manual updating.

I also admit I've overlooked a respective (if curt) warning at the start of your debug log:

*** [ DIAGNOSING ]: php version
[i] Warning:

See if Pi-hole can repair this itself.
Please run

pihole -r

and select Repair.

unfortunately it did not solve the problem, but right at the start I get this displayed, maybe this tells you more.

PHP Warning:  Failed loading Zend extension 'opcache.so' (tried: /usr/lib/php/20180731/opcache.so (/usr/lib/php/20180731/opcache.so: invalid ELF header), /usr/lib/php/20180731/opcache.so.so (/usr/lib/php/20180731/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo.so' (tried: /usr/lib/php/20180731/pdo.so (/usr/lib/php/20180731/pdo.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo.so.so (/usr/lib/php/20180731/pdo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/20180731/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver), /usr/lib/php/20180731/pdo_sqlite.so.so (/usr/lib/php/20180731/pdo_sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
  [i] Existing PHP installation detected : PHP version
PHP Warning:  Failed loading Zend extension 'opcache.so' (tried: /usr/lib/php/20180731/opcache.so (/usr/lib/php/20180731/opcache.so: invalid ELF header), /usr/lib/php/20180731/opcache.so.so (/usr/lib/php/20180731/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo.so' (tried: /usr/lib/php/20180731/pdo.so (/usr/lib/php/20180731/pdo.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo.so.so (/usr/lib/php/20180731/pdo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/20180731/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver), /usr/lib/php/20180731/pdo_sqlite.so.so (/usr/lib/php/20180731/pdo_sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  Failed loading Zend extension 'opcache.so' (tried: /usr/lib/php/20180731/opcache.so (/usr/lib/php/20180731/opcache.so: invalid ELF header), /usr/lib/php/20180731/opcache.so.so (/usr/lib/php/20180731/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo.so' (tried: /usr/lib/php/20180731/pdo.so (/usr/lib/php/20180731/pdo.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo.so.so (/usr/lib/php/20180731/pdo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/20180731/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver), /usr/lib/php/20180731/pdo_sqlite.so.so (/usr/lib/php/20180731/pdo_sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Let's ask your packet manager what it knows about PHP:

apt-cache show php

Sure :slightly_smiling_face:

Package: php
Source: php-defaults (69)
Version: 2:7.3+69
Installed-Size: 12
Maintainer: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
Architecture: all
Depends: php7.3
Size: 5964
SHA256: 0fbe0870fccbbcab2c5f6489af12167189d87db0d399295812e784f376151daa
SHA1: 3fa3f80e53f5ba1e0ed1a6d80307d3481638c693
MD5sum: c4a7abb123cb816fc2a7a546e6700e90
Description: server-side, HTML-embedded scripting language (default)
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on latest stable
 PHP version (currently 7.3).
Description-md5: 8877e9f08f3b7f9ce8d66848cbb639e7
Section: php
Priority: optional
Filename: pool/main/p/php-defaults/php_7.3+69_all.deb

See if trying to reinstall php-sqlite3 fixes your issue:

sudo apt-get install php-sqlite3

unfortunately, that didn't help.

udo apt-get install php-sqlite3
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-sqlite3 is already the newest version (2:7.3+69).
0 upgraded, 0 newly installed, 0 to remove and 152 not upgraded.

All errors are PHP related.
Might want to start with a fresh PHP stack.
Figure out currently installed PHP packages:

apt list --installed '*php*'

Purge/uninstall them all:

sudo apt purge <PACKAGE_1> <PACKAGE_2> <PACKAGE_3> etc

Select repair:

pihole -r

And test web GUI.

1 Like

I did what you said. Unfortunately, the web gui is still not available.
when i now enter php --version the following message appears

php --version
Segmentation fault

Something awfully wrong with your setup.
Is this a Raspi ?
If so, what does below output ?

dmesg -e | grep -i voltage

1 Like