Pi-hole stopped working, need help

I have a dedicated Raspberry PI for running Pi-hole; no changes have been made to the machine, and was working fine on Wed.
This past Thur, the service stopped working, not sure what caused the problem.
I tried the following with no success:

  • Check the service status using systemctl and service
  • Tried restarting the status, but command would hang
  • Tried restarting the Raspberry PI using sudo shutdown -r now and even that didn't work; had to force restart OS
    I tried looking through other posts for a resolution but I'm coming up empty handed. Any help is appreciated.

Expected Behaviour:

Expects pi-hole DNS service to be running.
OS: Raspbian 11
Hardware: RASPBERRY PI 3 MODEL B+

Actual Behaviour:

Pi-hole site admin page available, only by IP address
DNS service not running
Dashboard displaying "NaN" values for categories

Debug Token:

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

Youre debug log shows *pihole-FT*L to have failed with a segmentation fault:

*** [ DIAGNOSING ]: Pi-hole-FTL full status
   ● pihole-FTL.service - LSB: pihole-FTL daemon
     Loaded: loaded (/etc/init.d/pihole-FTL; generated)
     Active: active (exited) since Fri 2022-11-04 08:54:01 MST; 5h 44min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 646 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
        CPU: 81ms

Nov 04 08:53:59 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Nov 04 08:53:59 raspberrypi pihole-FTL[646]: Not running
Nov 04 08:53:59 raspberrypi su[681]: (to pihole) root on none
Nov 04 08:53:59 raspberrypi su[681]: pam_unix(su:session): session opened for user pihole(uid=999) by (uid=0)
Nov 04 08:54:01 raspberrypi pihole-FTL[743]: Segmentation fault

That's a severe condition.

Possible causes would include using a pihole-FTL binary not compiled for the system, or file system corruption affecting Pi-hole's files.

The former could happen if you swap SD cards with Pi-hole around from one system to another, where the pihole-FTL binary would be suitable only for the system where you orginally ran Pi-hole's installation.

For the latter, your SD card may be nearing its end of life, or its file system could have been damaged by using an insufficient PSU.
You may check your RPi’s log for under-voltage warnings:

sudo zgrep -ni “voltage” /var/log/syslog*

If this returns such warnings, you may need a better power cable/supply.

I ran the command for the under-voltage warnings and nothing was returned.

I'm afraid to think that the SD card is dying, but that seems like a reasonable assumption.

I'm going to swap out the SD card before it's too late.

Save your lists and network setup with Settings > Teleporter > Backup. That will save you some time (using Restore) after the new SD card Pi-hole is installed. It's always a good opportunity to do a spring clean!

Seems like I was too late.

Pihole was not responsive when trying to go to Settings > Teleporter > Backup, so I got a new SD card, and cloned the operating system to that.

The OS starts up, but Pihole is still inoperable.

A new debug was generated: https://tricorder.pi-hole.net/6WsnEItU/

Depending on how you did this, this may well have also cloned any corruption that was causing the original problem.

It would be best to write a fresh OS image using the Raspberry Pi Imager. You can also use this tool to configure the "pi" user account with a password and enable ssh (using the gear icon). Once that has finished, boot it in the RPi and give it five minutes to finish setting itself up.

Then perform system update (using the update tool if using the desktop version, or else sudo apt update/upgrade if using the command line), then finish the update with a reboot to restart with all the new updates.

Then do a fresh install of Pi-hole and set up the networking the same as the previous install.

Now you can test that this new install of Pi-hole is working and is not hanging. Hopefully this has fixed the problem.

Finally you can manually set up your lists again. Once it's all how you want it, take a Teleporter backup and keep that off the card somewhere as a backup. Repeat this periodically to ensure you have an up to date backup of your lists, groups and network setup.

We cannot be sure about that, so I didn't suggest that yet - file system corruption may also occur on sudden power losses, as caused e.g. by a black-out or by pulling the plug on an RPi.

Did you explore the possibility of a wrong binary yet?
What's the output of:

uname - a
sudo readelf -A /usr/bin/pihole-FTL

After running those, you should try

pihole -r

and choose Repair.

I had a look at the running services and noticed that a lot of them would not start up.

With all of those services failing to start, I decided to just reinstall the OS and reinstall pihole.

The system is up and running with a new SD card and things are looking good so far.

Thank you guys for trying to help me out.

This time around, I'll be sure to setup a backup script to copy the settings to a samba share.

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