Pi-Hole stops resolving/assigning DHCP IPs

Please follow the below template, it will help us to help you!

Expected Behaviour:

The Pi-Hole should continuously operate without any issues

Actual Behaviour:

For some time now, particularly in the morning, the Pi-Hole will stop assingning/renewing DHCP leases and/or stops resolving DNSs.
The graph on the Pi-Hole dashboard even shows a flat line (see screenshot) and this has been happening since I last updated. It's happening almost daily now and the only solution for me, so far, has been to reboot the Pi (which is a Pi B+)

Debug Token:

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





There is no screenshot posted.

The debug log looks normal.

Sorry, had forgot the screenshot..

Just edited it. Actualy, added a few more to have some comparison. I marked all the places where it stopped responding, though it was still "working".
There are always connected devices in the house, there should always be even a couple entries during those times and there are absolutely 0.

Did the Pi-hole stop responding in those periods (which doesn't seem to be the case, since there are small activity bumps showing), or did the clients move to another DNS server? This command (which will generate a query history in ugly text form at 10 minute intervals) will show the history in some detail. The times are in epoch time, which will need to be converted to real time to make sense.

Use date -d@epoch-time-here to do the conversion

echo ">overTime >quit" | nc localhost 4711

Taking today's example, here's what I got (shortened for better readability):

1587016500 64 0
1587017100 16 0
1587017700 10 0
1587018300 20 8
1587018900 0 0
1587019500 0 0
1587020100 0 0
1587020700 0 0
1587021300 0 0
1587021900 0 0
1587022500 0 0
1587023100 0 0
1587023700 0 0
1587024300 105 10
1587024900 151 28

Completely stopped at 7:35am only came back when I rebooted around 9am.

I didn't figure out to get the same kind of output for previous dates as the oldest I got with that command was Apr 15 22:05:00 BST 2020 but I'd be glad to dig deeper on the other dates like Apr 8th or between 10th and 11th.

This data goes back 24 hours via this API call.

Take a look in /var/log/pihole.log and /var/log/pihole-FTL.log in this time range and look for any errors. Also check /var/log/sylog.

1587018300 20 8
1587018900 0 0

Seems to be related to an FTL update...

/var/log/pihole.log:

Apr 16 07:23:50 dnsmasq[488]: reply lh3.googleusercontent.com is <CNAME>
Apr 16 07:23:50 dnsmasq[488]: reply googlehosted.l.googleusercontent.com is 172.217.168.161
Apr 16 07:23:53 dnsmasq[488]: query[AAAA] ssl.google-analytics.com from 192.168.1.22
Apr 16 07:23:53 dnsmasq[488]: /etc/pihole/gravity.list ssl.google-analytics.com is 0.0.0.0
Apr 16 07:23:53 dnsmasq[488]: query[A] ssl.google-analytics.com from 192.168.1.22
Apr 16 07:23:53 dnsmasq[488]: /etc/pihole/gravity.list ssl.google-analytics.com is 0.0.0.0
Apr 16 07:23:53 dnsmasq[488]: query[A] 2.debian.pool.ntp.org from 127.0.0.1
Apr 16 07:23:53 dnsmasq[488]: forwarded 2.debian.pool.ntp.org to 1.1.1.1
Apr 16 07:23:53 dnsmasq[488]: query[AAAA] 2.debian.pool.ntp.org from 127.0.0.1
Apr 16 07:23:53 dnsmasq[488]: forwarded 2.debian.pool.ntp.org to 1.1.1.1
Apr 16 07:23:53 dnsmasq[488]: reply 2.debian.pool.ntp.org is 194.117.47.44
Apr 16 07:23:53 dnsmasq[488]: reply 2.debian.pool.ntp.org is 193.136.152.72
Apr 16 07:23:53 dnsmasq[488]: reply 2.debian.pool.ntp.org is 2001:690:2100:14::2
Apr 16 07:23:53 dnsmasq[488]: reply 2.debian.pool.ntp.org is 2001:690:2100:80::4
Apr 16 07:23:53 dnsmasq[488]: reply 2.debian.pool.ntp.org is 2001:470:1f1d:947::1
Apr 16 07:23:53 dnsmasq[488]: reply 2.debian.pool.ntp.org is 2001:690:2100:14::1
Apr 16 09:04:17 dnsmasq[488]: query[A] api.github.com from 127.0.0.1
Apr 16 09:04:17 dnsmasq[488]: forwarded api.github.com to 1.0.0.1

/var/log/pihole-FTL.log:

[2020-04-16 07:23:44.313 486] Imported 16249 queries from the long-term database
[2020-04-16 07:23:44.315 486]  -> Total DNS queries: 16249
[2020-04-16 07:23:44.316 486]  -> Cached DNS queries: 4318
[2020-04-16 07:23:44.316 486]  -> Forwarded DNS queries: 9221
[2020-04-16 07:23:44.316 486]  -> Exactly blocked DNS queries: 2710
[2020-04-16 07:23:44.317 486]  -> Unknown DNS queries: 0
[2020-04-16 07:23:44.317 486]  -> Unique domains: 1188
[2020-04-16 07:23:44.317 486]  -> Unique clients: 9
[2020-04-16 07:23:44.318 486]  -> Known forward destinations: 2
[2020-04-16 07:23:44.318 486] Successfully accessed setupVars.conf
[2020-04-16 07:23:44.387 488] PID of FTL process: 488
[2020-04-16 07:23:44.388 488] Listening on port 4711 for incoming IPv4 telnet connections
[2020-04-16 07:23:44.390 488] Listening on port 4711 for incoming IPv6 telnet connections
[2020-04-16 07:23:44.391 488] Listening on Unix socket
[2020-04-16 07:23:44.418 488] Received SIGHUP, reloading cache
[2020-04-16 07:23:44.418 488] Blocking status is enabled
[2020-04-16 07:23:44.433 488] Compiled 0 Regex filters and 4 whitelisted domains in 13.5 msec (0 errors)
[2020-04-16 07:23:44.437 488] /etc/pihole/black.list: parsed 0 domains (took 0.4 ms)
[2020-04-16 07:23:46.804 488] /etc/pihole/gravity.list: parsed 99791 domains (took 2363.8 ms)
[2020-04-16 12:08:04.050 488] Resizing "/FTL-strings" from 28672 to 32768
[2020-04-16 14:14:18.619 488] Resizing "/FTL-strings" from 32768 to 36864
[2020-04-16 19:52:23.190 488] Resizing "/FTL-strings" from 36864 to 40960
[2020-04-16 20:08:00.060 488] dbquery(COMMIT) - SQL error (5): database is locked

That last line there got me a bit worried.

/var/log/syslog:

Apr 16 07:23:43 raspberrypi systemd[472]: Reached target Basic System.
Apr 16 07:23:43 raspberrypi systemd[1]: Started User Manager for UID 999.
Apr 16 07:23:43 raspberrypi systemd[472]: Reached target Default.
Apr 16 07:23:43 raspberrypi systemd[472]: Startup finished in 867ms.
Apr 16 07:23:43 raspberrypi systemd[1]: Started Session c1 of user pihole.
Apr 16 07:23:44 raspberrypi pihole-FTL[257]: FTL started!
Apr 16 07:23:44 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
Apr 16 07:23:49 raspberrypi dhcpcd[456]: eth0: DHCPv6 REPLY: No Addresses Available
Apr 16 07:23:50 raspberrypi systemd[1]: systemd-fsckd.service: Succeeded.
Apr 16 09:04:12 raspberrypi systemd-timesyncd[224]: Synchronized to time server for the first time [2001:690:2100:14::2]:123 (2.debian.pool.ntp.org).
Apr 16 09:04:12 raspberrypi systemd[1]: Starting Daily apt download activities...
Apr 16 09:04:12 raspberrypi systemd[1]: Starting Clean php session files...
Apr 16 09:04:15 raspberrypi systemd[1]: phpsessionclean.service: Succeeded.
Apr 16 09:04:15 raspberrypi systemd[1]: Started Clean php session files.

At first sight, I'd say that the FTL update process is proving to be problematic somehow. I'm also attaching the pihole and pihole-FTL logs, just in case.

pihole.txt (3.7 MB)
pihole-FTL.txt (4.8 KB)

Were you updating FTL at the time?

The FTL log shows the end of what appears to be an FTL restart. Was this something you were doing to respond to your problem?

Let's take a look at the permissions on the long term database. What is the ouput of the following:

ls -lha /etc/pihole/pihole-FTL.db

Those updates are automatic I believe as I'm not even awake at that time. Once we jump to 09:04 is when the Pi gets rebooted (cutting power mostly).

The permissions for the database seem about right:

pi@raspberrypi:~ $ ls -lha /etc/pihole/pihole-FTL.db
-rw-r--r-- 1 pihole pihole 116M Apr 16 22:31 /etc/pihole/pihole-FTL.db

There are no automatic FTL updates, nor automatic FTL restarts. Is is possible that the Pi-hole host is losing power (even momentarily) that would cause a device restart?

The permissions for the database file are correct.

It seems unlikely.. I never had issues with that before but it's certainly a possibility I can try to pay attention to.
Whatever it is, it's weird. Even syslog stops until the unit is completely restarted

That seems to indicate a system level problem on that device. I would keep an eye on it, and if it happens again look specifically for any events that may be related.

It's an old Pi B+.. I already have a Pi 4 4GB waiting to replace that one but I'm still waiting on the case for it, though it might get downgraded to 2GB of RAM in the mid-term. I also want to integrate speedtest-cli with PiHole and I need the Gigabit port to verify internet speed (should be 200Mbps but the Pi B+ Ethernet port can't handle that and only reads about 64Mbps)

Appreciate the help. Thank you very much

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