Pihole stopped working, not working even after installing new OS

So, on April this year I posted here on Consolidating blocklists failing about Pi-Hole getting stuck at 'consolidating list'. I was on DietPi and had installed Pi-Hole through DietPi. I uninstalled Pi-Hole from DietPi and installed it via your own install script ( curl -sSL https://install.pi-hole.net | bash). Things started working again, hurray!!

But, last week I noticed ads started coming up a bit on my network and on Pi-Hole's admin panel I saw Domains on Blocklist was 0. It was still serving requests, but domains on blocklist was a t 0. I did pihole -g to update gravity and I always got stuck on 'Extracting domains from blocklists...'.

I tried pi-hole -r , everything went smoothly until 'Extracting domains from blocklists...'. I than flashed the SD card with raspbian, install was a success, I than installed pihole through your install script and I got stuck at:

  [âś“] Consolidating blocklists
  [i] Extracting domains from blocklists...packet_write_wait: Connection to 192.168.1.XX port 22: Broken pipe

I can boot into raspbian, but ping any domain won't work.

ping google.com
ping: google.com: Temporary failure in name resolution

Pinging an IP on my LAN works, pinging 1.1.1.1 works. DNS doesn't, your install script doesn't do anything because DNS is broken on this raspberrypi. I than tried pihole -r , it doesn't do anything. No pihole command works, as if pihole wasn't even installed... I can't generate a token because any pihole command doesn't work. Although at /etc/pihole has:

ls /etc/pihole/
adlists.list                               list.4.s3.amazonaws.com.domains
dhcp.leases                                list.5.s3.amazonaws.com.domains
dns-servers.conf                           logrotate
install.log                                macvendor.db
list.0.raw.githubusercontent.com.domains   pihole-FTL.conf
list.1.mirror1.malwaredomains.com.domains  pihole-FTL.db
list.2.sysctl.org.domains                  regex.list
list.3.zeustracker.abuse.ch.domains        setupVars.conf

My original install had 600k domains blocklisted. I have another Pihole running inside FreeNAS VM working well, but this install was on a raspberrypi 3 as main PiHole on my network.

So, I'm thinking maybe my SD card has an issue since this is happening even after switching OS,.. (although the OS itself installed well). But before I go and buy a new one SD card, any advice or any ideas?

Something else is happening there.

This is a SSH connection that fails.

I am assuming you are SSH-ed in ans your connection drops.

In order for that to happen, one really needs to kill the resources on that device.

Do you get that when using default lists ? Or is it when you are using your custom list?

If using the default, and that symptom happening when installing fresh, there might be hardware related issue, maybe even a faulty power supply.

Thanks for the reply! Uptime is not a problem, it was months on and running well when all of a sudden the first pihole error came up. Note the errors and problems I noted before that specific error message (sorry, my fault my message wasn't clear).

Also, that error message just says that ssh waited a bunch for something to happen and nothing did. In other words, "Extracting domains from blocklists…" gets stuck and SSH just drops the connection, no new packets are happening so SSH just dies.

To answer your question, "Extracting domains from blocklists…" and subsequent connection breaking happens on default install list and on the original list I had.

Still if it is a hardware issue, why no pihole command works after this steps gets stuck? Why does DNS not work at all on this rpi after the incomplete install of pihole? I think it could be the SD card but I'm doubting mainly because raspbian installs well, I don't have any error with PiVPN which was also installed on same rpi... Nothing else was broken...

This is the tale tale sign of something using all the resources of the device.
It is a classic sign of not enough "juice" to run the list compiling process. The CPU/board is under-powered and it's behaving erratically since there is no "room" left for the ssh connection and other processes and that's why it's failing.

because of the above :slight_smile:
It's not just one thing that's failing ... it's multiple.

The SD card can have a corrupted sector or more that only get accessed when running that script. That can cause failures.

But i believe that your issue is the power supply as the same version of Pi-hole runs on thousands of devices (mine included) and you seem to be the only one with this problem ...

In Linux world, most anything is a file/folder even a new socket for an SSH connection.
If something runs full, no new connections can be established.
The old already established connections keep on working most of the times.
Check if something full or near full with below one:

df -h

But most likely your issue is power related or poor cables like @RamSet says.

Ah yes ... the available space ... Indeed indeed ...

Forgot about that one ... Dank u wel :wink:

1 Like

Sure, please note running pihole itself there was no issue. Running PiVPN along with it there was no issue. Installing raspbian there was no issue. Updating packages there was no issue... The ONLY issue was exactly on "Extracting domains from blocklists…” on this specific rpi.

I get the SD card may be corrupted somehow, it still is what I think might be the culprit, but consider that I tried with DietPi which was working well, all of a sudden updating gravity by itself (cronjob) stopped working, although Pihole was still serving request. That is when I started noticing issues. Than I manually updated gravity and it didn't work. Uninstalled Pihole (to see if somehow something with DietPi was conflicting with Pihole), installed it again and installation was ok until "Extracting domains from blocklists…”.

I than flashed raspbian which installed ok, no issues there, updated packages, DNS worked, than when I went to install Pihole crashed again on "Extracting domains from blocklists…”. I don't think it is likely that the same sector is used across different OS installs...

Power supply could be the problem but logic (from my 2 cents) doesn't support this. This rpi was serving OpenVPN traffic well, which is CPU intensive and thus requires extra power. Uptime was also no issue, machine never lost its uptime except when I flashed raspbian and it was running Pihole for over a year.

Again, I think I wasn't clear enough, 2 different OS installs on the same hardware. Space isn't an issue. Now I have:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  1.2G   13G   9% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M  6.2M  457M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1   43M   23M   21M  53% /boot
tmpfs            93M     0   93M   0% /run/user/1000

There have been other reports in the past with issues updating gravity, for one reason or another (showing 0 domains on blocklist). I also noted I was running 2 Pihole installs. The other one inside a FreeNAS host (a BSD operating system) with an Ubuntu VM is working well. I get it that Pihole works, I get it it may be a hardware issue but the sequence of events and the only thing not working being gravity update makes things quite intriguing and I'm trying to find out why if it is a hardware issue it only crashes when 1 specific command is run. :slight_smile:

Encryption for VPN puts some load on the CPU.
But its little compared to a gravity pull where lists from different sites get downloaded (also encrypted via https) and manipulated/conditioned to merge into one list.
If its a power/cabling issue, gravity or a boot would be the ones that drain the most power.

Another possibility is that you have added a list URL thats not compatible with Pihole's hosts file format.
Try remove the lists that you've added for a while here:

http://pi.hole/admin/settings.php?tab=blocklists

Below are the default ones:

pi@noads:~ $ cat /etc/pihole/adlists.list
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt

Changed SD card, changed power supply, flashed new raspbian (which is now Buster), encountered an error with lighttpd which I saw a fix mentioned on Raspbian Buster lighttpd failed to start - #3 by war59312 . Now PiHole is up and running.

Thanks for the help!

1 Like

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