Web Interface Broken after Power Loss

Hardware is a Raspberry Pi Gen 2 with 2GB of RAM and a 8GB sd card. I'm using it as a DHCP server as well.

Expected Behaviour:

Pihole web interface loads when accessing http://pihole/admin.

Actual Behaviour:

Instead, I get a 503 Service not available error. This happened after a sudden loss of power (power went out in neigborhood). The ad blocking and CLI still works.

Debug Token:

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

For additional context, running php -v returns a segmentation fault.

EDIT: Attempting to purge/reinstall any php packages results in a segmentation fault as well.

EDIT: Trying to create a teleporter backup pihole -a -t also results in a seg fault.

As you already noticed, your PHP install is severely broken:

*** [ DIAGNOSING ]: php version
[✗] php version could not be detected.

You can try to reinstall PHP, but apparently something else might be broken in your system.

If you can't reinstall PHP, my suggestion is to reinstall your OS and start fresh.

If you are not able to create a teleporter file, you can copy the files in /etc/pihole as a last resort. Later you can use this files as a base to edit the config of your new installation.

Yeah, I think I will reinstall onto a new SD. I think the power loss might have corrupted the file system somehow. What should I do with the files in /etc/pihole when I reinstall. Just copy them over?

To tell the truth, I never did that before.

I think you can create the directory with the old files and install Pi-hole. I think Pi-hole will overwrite some files, but it will keep your database and setupVars.conf.

To be safe, keep a copy of the files in case this goes wrong.

This worked! It detected that there were previous files (that I copied to /etc/) and asked to upgrade them when installing.

1 Like

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