Unable to view page - error 503

Hi,

I've a pihole image running on a rpi zero board for few months.
I noticed now that I cannot access the web page.
This' what I've done so far:

Expected Behaviour:

The web interface should be working.
Actual Behaviour:

When I access my pihole via its local URL I get the 503 - Service Not Available error message.

Debug Token:
n7ysdzr9fp

pihole -v
Pi-hole version is v4.4 (Latest: v4.4)
AdminLTE version is v4.3.3 (Latest: v4.3.3)
FTL version is v4.3.1 (Latest: v4.3.1)

In /var/log/lighttpd/error.log found:
2020-04-29 12:13:02: (gw_backend.c.335) child signalled: 11
2020-04-29 12:13:03: (gw_backend.c.476) unlink /var/run/lighttpd/php.socket-0 after connect failed: Connection refused

sudo update
sudo upgrade -y
sudo clean
pihole -r
Error: Unable to update package cache. Please try "apt-get update"

sudo apt-get update doesn't work anymore, cannot access the package file.

If I need to burn a new pihole image again, can I save all the data achived so far? If so, how?
TIA

Welcome to the Pi-hole community, ebolisa. :slight_smile:

Your debug log confirms your observation:

*** [ 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, 29 Apr 2020 10:33:39 GMT
Server: lighttpd/1.4.53

On first glance, this doesn't look like a direct Pi-hole issue.
Did you perhaps configure additional web content to be served by lighttpd?

Let's try to verifiy your lighttpd configuration.
Executed on your Pi-hole machine, what’s the output of:

lighttpd -t -f /etc/lighttpd/lighttpd.conf

Also take a look if restarting lighttpd provides some additional insights:

sudo service lighttpd restart

In case that fails, please provide the output for:

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

Hi, Thank you for getting back to me.

The apt update command worked fine till I used pihole -r.

However, it's possible that few days ago I ran this command
sudo apt-get install avahi-daemon
but I'm not sure.

Here's what I get running the above commands:


lighttpd -t -f /etc/lighttpd/lighttpd.conf
Syntax OK

sudo service lighttpd restart
--no output --

sudo systemctl status --full --no-pager pihole-FTL.service
pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Wed 2020-04-29 14:04:21 CEST; 1h 28min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 284 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

abr 29 14:04:01 rpizero systemd[1]: Starting LSB: pihole-FTL daemon...
abr 29 14:04:03 rpizero pihole-FTL[284]: Not running
abr 29 14:04:19 rpizero su[512]: (to pihole) root on none
abr 29 14:04:19 rpizero su[512]: pam_unix(su:session): session opened for user pihole by (uid=0)
abr 29 14:04:20 rpizero su[512]: pam_systemd(su:session): Failed to stat() runtime directory '/run/user/999': Cannot find file or directory
abr 29 14:04:20 rpizero su[512]: pam_systemd(su:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
abr 29 14:04:21 rpizero pihole-FTL[284]: FTL started!
abr 29 14:04:21 rpizero systemd[1]: Started LSB: pihole-FTL daemon.

EDIT:

I gained control over update/upgrade issuing the following commands:

sudo rm /var/lib/apt/lists/* -vf
sudo apt update
sudo apt upgrade

but I'm hesitating issuing pihole -r

lighttpd shows no irregularities for your system.

These are not official commands on a standard Raspbian.
If you're using some convenience scripts, check if they introduce your update error, e.g. by relating to wrong package names or locations.

I am still not convinced that your error is related to Pi-hole.

You didn't reply yet to one of my previous questions:

No, I did not reconfigured Lighttpd, I'd not know how.

Please load the following URL in a browser and post a screen capture of what you are seeing, including the URL. You can paste the screen snap directly into a reply here.

http://pi.hole/admin

http://my_local_ip/admin shows: 503 service not available.

Anyhow, I lost control of my SD card so I installed a new image and pihole.

For future use, can the DB file be recovered/backup?

The long term database is stored at /etc/pihole/pihole-FTL.db

This is what fixed it for me:
sudo apt install --reinstall php7.3-cgi php7.3-cli php7.3-common php7.3-intl php7.3-json php7.3-opcache php7.3-readline php7.3-sqlite3