After a reboot or restart (pihole restartdns) everything works normally as expected, however after a period of time when I pull up the admin interface the section that shows the percentage Blocked blinks with 'Undefined%
Details about my system:
I am running the latest version of PiHole on a Raspberry Pi Desktop environment. Debian kernel with Jessie (?) desktop environment.
What I have changed since installing Pi-hole:
Quite literally nothing except system updates and upgrades.
Jessie has been unsupported for several years now.
Please upload a debug log and post just the token that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
You have some errors/abnormal entries in your logs:
-rw-r--r-- 1 pihole pihole 3022789 May 4 13:04 /var/log/pihole-FTL.log
-----head of pihole-FTL.log------
[2021-05-04 00:00:05.242 8625/T8626] Client denied (at max capacity of 255): 321
[2021-05-04 00:00:05.242 8625/T8626] IPv4 telnet error: Success (0)
-----tail of pihole-FTL.log------
[2021-05-04 13:03:42.812 22096M] SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
[2021-05-04 13:03:42.812 22096M] getMACfromIP("192.168.7.102") - SQL error prepare: SQL logic error
[2021-05-04 13:03:42.812 22096M] SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-05-04 13:03:42.812 22096M] getNameFromIP("192.168.7.102") - SQL error prepare: SQL logic error
[2021-05-04 13:03:42.813 22096M] SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
[2021-05-04 13:03:42.813 22096M] getIfaceFromIP("192.168.7.102") - SQL error prepare: SQL logic error
[2021-05-04 13:03:42.814 22096M] SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
[2021-05-04 13:03:42.814 22096M] getMACfromIP("192.168.7.102") - SQL error prepare: SQL logic error
[2021-05-04 13:03:42.815 22096M] SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
...
[2021-05-04 13:03:59.802 22096M] SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
[2021-05-04 13:03:59.802 22096M] getIfaceFromIP("192.168.7.15") - SQL error prepare: SQL logic error
[2021-05-04 13:04:00.140 22096/T22100] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1588619040;" (1)
[2021-05-04 13:04:00.140 22096/T22100] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1588619040;" failed: SQL logic error
[2021-05-04 13:04:00.140 22096/T22100] SQLite3 message: API call with invalid database connection pointer (21)
[2021-05-04 13:04:00.140 22096/T22100] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)
[2021-05-04 13:04:00.140 22096/T22100] Error while trying to close database: bad parameter or other API misuse
How much traffic is your Pi-hole seeing on a daily basis? Please post the output of the following run from the Pi terminal:
ls -lha /etc/pihole/pihole-FTL.db
sqlite3 /etc/pihole/pihole-FTL.db "SELECT value FROM counters WHERE id = 0"
It appears your long term database is corrupted. The filesize is zero, and the database doesn't have information that would be expected. Let's move the existing file and start a new one and see if the problem persists.
That looks like it fixed the issue, I let it do its thing during the night and checked this morning, information has populated and its no longer blinking.
Thank you very much!
If we can indulge just a bit further, what do you think caused the issue so that I can be proactive on it? Power loss? Anything like that?