GUI showing no Pihole V5.3.1: Statistics and Error Msg “Undefined %” in “Precent Blocked"

Just upgraded to the brand spanking new Pi-hole v5.3.1 Web Interface v5.5 FTL v5.8 and both of my Pi on 2 separate Pi4s works fine for a few hours and then will show no statistics on the GUI and error msg "Undefined %". DNS look-ups and black-listing still works..

If I restart the "Restart DNS Resolver" in Settings/System, then the FTL Information gets populated correctly with Cache Size, DNS Cache Insertions and Evictions..

Rebooted both of the Pi and did "Pihole -r", really hope that fixes it.... Any ideas?

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:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

3 posts were split to a new topic: 'Lost Connection To API' after update

Tried both ways and it just hangs.. when I run Pihole -d, the script stops here:

Can you upload your /var/log/pihole-FTL.log

pihole-FTL.log.txt (1.4 MB)

Here you go..

[2021-04-17 00:00:26.059 12673M] Resizing "FTL-domains" from 4096 to (512 * 16) == 8192 (/dev/shm: 1.1MB used, 2.0GB total, FTL uses 1.1MB)
[2021-04-17 00:01:00.229 12673/T12677] SQLite3 message: database corruption at line 67162 of [5d4c65779d] (11)
[2021-04-17 00:01:00.229 12673/T12677] SQLite3 message: statement aborts at 3: [SELECT MAX(ID) FROM queries] database disk image is malformed (11)
[2021-04-17 00:01:00.229 12673/T12677] Encountered step error in get_max_query_ID(): database disk image is malformed
[2021-04-17 00:01:00.229 12673/T12677] Error while trying to close database: database is locked
[2021-04-17 00:01:00.229 12673/T12677] SQLite3 message: database corruption at line 67162 of [5d4c65779d] (11)
[2021-04-17 00:01:00.229 12673/T12677] SQLite3 message: statement aborts at 11: [INSERT INTO queries VALUES (NULL,?,?,?,?,?,?,?)] database disk image is malformed (11)
[2021-04-17 00:01:00.229 12673/T12677] Encountered error while trying to store queries in long-term database: database disk image is malformed
[2021-04-17 00:01:00.325 12673/T12677] Error while trying to close database: database is locked

Your pihole-FTL.db (long-term database) is malformated.

We are currently see a lot of these reports and looking into the issue.

Anything I can do on my end to stop the problem while waiting for the official fix?

Run

sudo sqlite3 /etc/pihole/pihole-FTL.db "PRAGMA integrity_check"

Rebooted the pi and ran the command and it just hangs..

Oh wait… it’s doing something… slowly.. will wait for it to finish up…

Ok, now what? Says that it’s malformed…

What version do you have?

sqlite3 --version

3.27.2 2019-02-25

Running the steps listed now… Will post results asap.

Edit1: "sudo pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db.recover | sudo sqlite3 /etc/pihole/pihole-FTL.db.recovered" seems to be taking its own sweet time… or its stuck.. 5 mins and counting..

1 Like

Best/Recommended way to Nuke and start over?

Just pihole-FTL.db. There's no need to reinstall the whole shebang.

Done and done for both of my misbehaving Piholes. Will monitor and see if its ok now or if the error persist.

1 Like

Getting this on pihole-FTL.log (live):

[2021-04-18 02:26:34.001 698M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-18 02:26:34.002 698M] getNameFromIP("192.168.1.73") - SQL error prepare: SQL logic error
[2021-04-18 02:26:34.007 698M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-18 02:26:34.007 698M] getNameFromIP("192.168.1.73") - SQL error prepare: SQL logic error
[2021-04-18 02:26:34.012 698M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-18 02:26:34.012 698M] getNameFromIP("192.168.1.73") - SQL error prepare: SQL logic error
[2021-04-18 02:26:41.722 698M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-18 02:26:41.722 698M] getNameFromIP("192.168.1.64") - SQL error prepare: SQL logic error
[2021-04-18 02:26:41.726 698M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-18 02:26:41.727 698M] getNameFromIP("192.168.1.64") - SQL error prepare: SQL logic error
[2021-04-18 02:26:41.731 698M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-18 02:26:41.731 698M] getNameFromIP("192.168.1.64") - SQL error prepare: SQL logic error
[2021-04-18 02:27:00.676 698/T702] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587148020;" (1)
[2021-04-18 02:27:00.677 698/T702] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587148020;" failed: SQL logic error
[2021-04-18 02:27:00.677 698/T702] SQLite3 message: API call with invalid database connection pointer (21)
[2021-04-18 02:27:00.677 698/T702] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)
[2021-04-18 02:27:00.677 698/T702] Error while trying to close database: bad parameter or other API misuse

Any cause for concern?

Yeah, did you stop pihole-FTL, then delete the file and then start pihole-FTL again?

Deleting the database while pihole-FTL is running is going to bork it.

Yup.

sudo systemctl stop pihole-FTL
sudo rm pihole-FTL.db
sudo systemctl start pihole-FTL

followed by a reboot for good measure..