"DNS service not running" error message from FTL after update to Pi-hole 5.3.1 / FTL 5.8

I've been advised by @DanSchaper to start a new topic on this issue.

Expected Behaviour:

Yesterday, I performed a standard "sudo pihole -up" on my Raspberry Pi 3B+ hardware (buster OS, fully up-to-date). The upgrades to Pi-hole/Web/FTL of 5.3.1/5.5/5.8 appeared to go smoothly as expected, and I noted no obvious changes in functionality for several hours thereafter -- as expected.

Actual Behaviour:

Immediately after the upgrades, I did not check any logs. After several hours of running, DNS functionality ceased and there was an alert in red in the top-left corner of the gui stating something like "DNS service not running" and attributing this to the FTL. I have configured two default IPv4 "Quad9 (filtered, DNSSEC)" DNS servers. Via Settings in the gui, I was able to get out of the situation by adding the two default IPv4 "Google (ECS)" servers and saving. This action enabled DNS queries to resume and the gui showed green status dots again. I then again unticked the two "Google (ECS)" boxes to regain my normal config. DNS behaviour appeared to be functioning OK thereafter; however, now the Dashboard no longer works and there are database corruption and write errors appearing in pihole-FTL.log, for example:

[2021-04-16 17:21:00.800 823/T827] SQLite3 message: database corruption at line 67162 of [5d4c65779d] (11)
[2021-04-16 17:21:00.800 823/T827] SQLite3 message: statement aborts at 3: [SELECT MAX(ID) FROM queries] database disk image is malformed (11)
[2021-04-16 17:21:00.800 823/T827] Encountered step error in get_max_query_ID(): database disk image is malformed
[2021-04-16 17:21:00.800 823/T827] Error while trying to close database: database is locked
[2021-04-16 17:21:00.800 823/T827] Encountered error while trying to store queries in long-term database: database is locked
[2021-04-16 17:21:00.853 823/T827] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1587057660;" failed: database is locked
[2021-04-16 17:21:00.853 823/T827] Error while trying to close database: database is locked
[2021-04-16 17:21:00.853 823/T827] Error while trying to close database: database is locked

Debug Token:

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

You got a corrupted database, this is causing all the problems. You could try to repair it, or just move/delete the old database.

Such errors are usually happen due to EOL SD-Cards or sudden power losses which lead to filesystem errors. Do you have a proper power supply for your device?

Thanks @yubiuser . I doubt it's an EOL SD card; this card is very new and 64GB. I also have /var/log mounted as a tmpfs to protect the card as much as possible. It's always been shut down properly.

I removed the old database following your instructions. Still getting errors, however:

[2021-04-16 19:56:58.220 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
[2021-04-16 19:56:58.220 18050M] getAliasclientIDfromIP("192.168.2.211") - SQL error prepare: SQL logic error
[2021-04-16 19:56:58.223 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
[2021-04-16 19:56:58.223 18050M] getNameFromIP("192.168.2.211") - SQL error prepare: SQL logic error
[2021-04-16 19:57:00.754 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067020;" (1)
[2021-04-16 19:57:00.755 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067020;" failed: SQL logic error
[2021-04-16 19:57:00.755 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)
[2021-04-16 19:57:00.755 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)
[2021-04-16 19:57:00.755 18050/T18054] Error while trying to close database: bad parameter or other API misuse
[2021-04-16 19:57:01.649 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
[2021-04-16 19:57:01.649 18050M] getAliasclientIDfromIP("192.168.2.251") - SQL error prepare: SQL logic error
[2021-04-16 19:57:01.652 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

Can you please post the output of

cat /var/log/pihole-FTL.log

Hi @yubiuser,

The full file (since I tried a reboot at Apr. 16, 10:24UTC) is evidently too long to post; I'll try to provide the first relevant part in this post, with the second part in a post to follow. Before the time period covered by the logs I'm posting, FTL had been shut down at 18:40, which was I think when I saved new DNS info in the GUI (Settings / DNS). Following this, the shut down at 19:55 was when I performed the operations you suggested (stopping the service, renaming the DB file). The errors immediately after this point may be of most interest, as they are SQL logic errors on a freshly created db. I note that these errors stopped after 20:09, when I manually restarted FTL via the GUI (Settings / System / Restart DNS resolver). Things have apparently been running OK since Apr. 16 at 20:09.

To recapitulate: I have no evidence yet that my SD card was/is at EOL. How the DB got corrupted after/during the upgrade to FTL v5.8 is unknown to me. After following the suggestion to delete the old corrupted DB, SQL logic errors could be seen. These then stopped after a subsequent stop/start of the service.

Thanks for your interest and help in figuring out this issue!

Best regards,
Andreas

(First part of log file; second and final part will be in subsequent posted reply to this post.)

[2021-04-16 19:54:00.124 15685/T15689] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1587066840;" failed: database is locked

[2021-04-16 19:54:00.125 15685/T15689] Error while trying to close database: database is locked

[2021-04-16 19:54:00.125 15685/T15689] Error while trying to close database: database is locked

[2021-04-16 19:55:00.205 15685/T15689] SQLite3 message: database corruption at line 67162 of [5d4c65779d] (11)

[2021-04-16 19:55:00.205 15685/T15689] SQLite3 message: statement aborts at 3: [SELECT MAX(ID) FROM queries] database disk image is malformed (11)

[2021-04-16 19:55:00.205 15685/T15689] Encountered step error in get_max_query_ID(): database disk image is malformed

[2021-04-16 19:55:00.205 15685/T15689] Error while trying to close database: database is locked

[2021-04-16 19:55:00.205 15685/T15689] Encountered error while trying to store queries in long-term database: database is locked

[2021-04-16 19:55:00.232 15685/T15689] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1587066900;" failed: database is locked

[2021-04-16 19:55:00.232 15685/T15689] Error while trying to close database: database is locked

[2021-04-16 19:55:00.232 15685/T15689] Error while trying to close database: database is locked

[2021-04-16 19:55:47.272 15685M] Shutting down...

[2021-04-16 19:55:47.523 15685M] SQLite3 message: database corruption at line 67162 of [5d4c65779d] (11)

[2021-04-16 19:55:47.523 15685M] SQLite3 message: statement aborts at 3: [SELECT MAX(ID) FROM queries] database disk image is malformed (11)

[2021-04-16 19:55:47.523 15685M] Encountered step error in get_max_query_ID(): database disk image is malformed

[2021-04-16 19:55:47.523 15685M] Error while trying to close database: database is locked

[2021-04-16 19:55:47.524 15685M] Encountered error while trying to store queries in long-term database: database is locked

[2021-04-16 19:55:47.524 15685M] Error while trying to close database: database is locked

[2021-04-16 19:55:47.524 15685M] Finished final database update

[2021-04-16 19:55:47.524 15685M] Asking threads to cancel

[2021-04-16 19:55:47.524 15685M] Waiting for threads to join

[2021-04-16 19:55:47.525 15685M] All threads joined

[2021-04-16 19:55:47.527 15685M] ########## FTL terminated after 1h 14m 51s (code 0)! ##########

[2021-04-16 19:56:30.999 18048M] Using log file /var/log/pihole-FTL.log

[2021-04-16 19:56:31.000 18048M] ########## FTL started! ##########

[2021-04-16 19:56:31.000 18048M] FTL branch: master

[2021-04-16 19:56:31.000 18048M] FTL version: v5.8

[2021-04-16 19:56:31.000 18048M] FTL commit: bdaff4bf

[2021-04-16 19:56:31.000 18048M] FTL date: 2021-04-14 18:52:20 +0100

[2021-04-16 19:56:31.000 18048M] FTL user: pihole

[2021-04-16 19:56:31.000 18048M] Compiled for armv7hf (compiled on CI) using arm-linux-gnueabihf-gcc (Debian 6.3.0-18) 6.3.0 20170516

[2021-04-16 19:56:31.000 18048M] Creating mutex

[2021-04-16 19:56:31.001 18048M] Starting config file parsing (/etc/pihole/pihole-FTL.conf)

[2021-04-16 19:56:31.002 18048M] SOCKET_LISTENING: only local

[2021-04-16 19:56:31.002 18048M] AAAA_QUERY_ANALYSIS: Show AAAA queries

[2021-04-16 19:56:31.002 18048M] MAXDBDAYS: max age for stored queries is 365 days

[2021-04-16 19:56:31.002 18048M] RESOLVE_IPV6: Resolve IPv6 addresses

[2021-04-16 19:56:31.002 18048M] RESOLVE_IPV4: Resolve IPv4 addresses

[2021-04-16 19:56:31.002 18048M] DBINTERVAL: saving to DB file every minute

[2021-04-16 19:56:31.002 18048M] DBFILE: Using /etc/pihole/pihole-FTL.db

[2021-04-16 19:56:31.002 18048M] MAXLOGAGE: Importing up to 24.0 hours of log data

[2021-04-16 19:56:31.002 18048M] PRIVACYLEVEL: Set to 0

[2021-04-16 19:56:31.002 18048M] IGNORE_LOCALHOST: Show queries from localhost

[2021-04-16 19:56:31.002 18048M] BLOCKINGMODE: Null IPs for blocked domains

[2021-04-16 19:56:31.002 18048M] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries

[2021-04-16 19:56:31.002 18048M] DBIMPORT: Importing history from database

[2021-04-16 19:56:31.002 18048M] PIDFILE: Using /run/pihole-FTL.pid

[2021-04-16 19:56:31.002 18048M] PORTFILE: Using /run/pihole-FTL.port

[2021-04-16 19:56:31.002 18048M] SOCKETFILE: Using /run/pihole/FTL.sock

[2021-04-16 19:56:31.002 18048M] SETUPVARSFILE: Using /etc/pihole/setupVars.conf

[2021-04-16 19:56:31.002 18048M] MACVENDORDB: Using /etc/pihole/macvendor.db

[2021-04-16 19:56:31.002 18048M] GRAVITYDB: Using /etc/pihole/gravity.db

[2021-04-16 19:56:31.002 18048M] PARSE_ARP_CACHE: Active

[2021-04-16 19:56:31.002 18048M] CNAME_DEEP_INSPECT: Active

[2021-04-16 19:56:31.002 18048M] DELAY_STARTUP: No delay requested.

[2021-04-16 19:56:31.002 18048M] BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}

[2021-04-16 19:56:31.003 18048M] NICE: Set process niceness to -10 (default)

[2021-04-16 19:56:31.003 18048M] MAXNETAGE: Removing IP addresses and host names from network table after 365 days

[2021-04-16 19:56:31.003 18048M] NAMES_FROM_NETDB: Enabled, trying to get names from network database

[2021-04-16 19:56:31.003 18048M] EDNS0_ECS: Overwrite client from ECS information

[2021-04-16 19:56:31.003 18048M] REFRESH_HOSTNAMES: Periodically refreshing IPv4 names

[2021-04-16 19:56:31.003 18048M] RATE_LIMIT: Rate-limiting client making more than 1000 queries in 60 seconds

[2021-04-16 19:56:31.003 18048M] REPLY_ADDR4: Automatic interface-dependent detection of address

[2021-04-16 19:56:31.003 18048M] REPLY_ADDR6: Automatic interface-dependent detection of address

[2021-04-16 19:56:31.003 18048M] Finished config file parsing

[2021-04-16 19:56:31.003 18048M] No database file found, creating new (empty) database

[2021-04-16 19:56:31.181 18048M] Database version is 1

[2021-04-16 19:56:31.181 18048M] Updating long-term database to version 2

[2021-04-16 19:56:31.356 18048M] Updating long-term database to version 3

[2021-04-16 19:56:31.424 18048M] Updating long-term database to version 4

[2021-04-16 19:56:31.460 18048M] Updating long-term database to version 5

[2021-04-16 19:56:31.513 18048M] Updating long-term database to version 6

[2021-04-16 19:56:31.580 18048M] Updating long-term database to version 7

[2021-04-16 19:56:31.651 18048M] Column additional_info not initialized, database not available

[2021-04-16 19:56:31.652 18048M] Imported 0 queries from the long-term database

[2021-04-16 19:56:31.652 18048M] -> Total DNS queries: 0

[2021-04-16 19:56:31.652 18048M] -> Cached DNS queries: 0

[2021-04-16 19:56:31.653 18048M] -> Forwarded DNS queries: 0

[2021-04-16 19:56:31.653 18048M] -> Blocked DNS queries: 0

[2021-04-16 19:56:31.653 18048M] -> Unknown DNS queries: 0

[2021-04-16 19:56:31.653 18048M] -> Unique domains: 0

[2021-04-16 19:56:31.653 18048M] -> Unique clients: 0

[2021-04-16 19:56:31.653 18048M] -> Known forward destinations: 0

[2021-04-16 19:56:31.653 18048M] Successfully accessed setupVars.conf

[2021-04-16 19:56:31.665 18050M] PID of FTL process: 18050

[2021-04-16 19:56:31.666 18050/T18051] Listening on port 4711 for incoming IPv4 telnet connections

[2021-04-16 19:56:31.667 18050M] INFO: FTL is running as user pihole (UID 999)

[2021-04-16 19:56:31.668 18050/T18053] Listening on Unix socket

[2021-04-16 19:56:31.668 18050/T18052] Listening on port 4711 for incoming IPv6 telnet connections

[2021-04-16 19:56:31.669 18050M] Reloading DNS cache

[2021-04-16 19:56:31.669 18050M] Blocking status is enabled

[2021-04-16 19:56:31.840 18050M] Resizing "FTL-strings" from 40960 to (81920 * 1) == 81920 (/dev/shm: 1.0MB used, 484.6MB total, FTL uses 1.0MB)

[2021-04-16 19:56:31.842 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:31.842 18050M] getAliasclientIDfromIP("192.168.2.250") - SQL error prepare: SQL logic error

[2021-04-16 19:56:31.843 18050M] New upstream server: 149.112.112.112:53 (0/1024)

[2021-04-16 19:56:32.713 18050/T18054] Compiled 0 whitelist and 0 blacklist regex filters for 1 clients in 1.1 msec

[2021-04-16 19:56:33.675 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:33.675 18050M] getAliasclientIDfromIP("127.0.0.1") - SQL error prepare: SQL logic error

[2021-04-16 19:56:33.678 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:33.678 18050M] getNameFromIP("127.0.0.1") - SQL error prepare: SQL logic error

[2021-04-16 19:56:33.683 18050M] New upstream server: 9.9.9.9:53 (1/1024)

[2021-04-16 19:56:40.477 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:40.477 18050M] getAliasclientIDfromIP("192.168.2.245") - SQL error prepare: SQL logic error

[2021-04-16 19:56:40.480 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:40.480 18050M] getNameFromIP("192.168.2.245") - SQL error prepare: SQL logic error

[2021-04-16 19:56:40.948 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:40.948 18050M] getAliasclientIDfromIP("192.168.2.214") - SQL error prepare: SQL logic error

[2021-04-16 19:56:40.951 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:40.952 18050M] getNameFromIP("192.168.2.214") - SQL error prepare: SQL logic error

[2021-04-16 19:56:47.025 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:47.025 18050M] getAliasclientIDfromIP("192.168.2.221") - SQL error prepare: SQL logic error

[2021-04-16 19:56:47.028 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:47.028 18050M] getNameFromIP("192.168.2.221") - SQL error prepare: SQL logic error

[2021-04-16 19:56:49.574 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:49.574 18050M] getAliasclientIDfromIP("192.168.2.243") - SQL error prepare: SQL logic error

[2021-04-16 19:56:49.577 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:49.577 18050M] getNameFromIP("192.168.2.243") - SQL error prepare: SQL logic error

[2021-04-16 19:56:53.803 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:53.803 18050M] getAliasclientIDfromIP("192.168.2.239") - SQL error prepare: SQL logic error

[2021-04-16 19:56:53.806 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:53.806 18050M] getNameFromIP("192.168.2.239") - SQL error prepare: SQL logic error

[2021-04-16 19:56:58.220 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:56:58.220 18050M] getAliasclientIDfromIP("192.168.2.211") - SQL error prepare: SQL logic error

[2021-04-16 19:56:58.223 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:56:58.223 18050M] getNameFromIP("192.168.2.211") - SQL error prepare: SQL logic error

[2021-04-16 19:57:00.754 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067020;" (1)

[2021-04-16 19:57:00.755 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067020;" failed: SQL logic error

[2021-04-16 19:57:00.755 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 19:57:00.755 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 19:57:00.755 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 19:57:01.649 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:57:01.649 18050M] getAliasclientIDfromIP("192.168.2.251") - SQL error prepare: SQL logic error

[2021-04-16 19:57:01.652 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:57:01.652 18050M] getNameFromIP("192.168.2.251") - SQL error prepare: SQL logic error

[2021-04-16 19:57:13.141 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:57:13.142 18050M] getAliasclientIDfromIP("192.168.2.244") - SQL error prepare: SQL logic error

[2021-04-16 19:57:13.144 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:57:13.145 18050M] getNameFromIP("192.168.2.244") - SQL error prepare: SQL logic error

[2021-04-16 19:57:21.044 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:57:21.044 18050M] getAliasclientIDfromIP("192.168.2.210") - SQL error prepare: SQL logic error

[2021-04-16 19:57:21.047 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:57:21.047 18050M] getNameFromIP("192.168.2.210") - SQL error prepare: SQL logic error

[2021-04-16 19:57:41.932 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:57:41.932 18050M] getNameFromIP("192.168.2.250") - SQL error prepare: SQL logic error

[2021-04-16 19:57:54.753 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:57:54.753 18050M] getAliasclientIDfromIP("192.168.2.223") - SQL error prepare: SQL logic error

[2021-04-16 19:57:54.756 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:57:54.756 18050M] getNameFromIP("192.168.2.223") - SQL error prepare: SQL logic error

[2021-04-16 19:57:54.964 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:57:54.964 18050M] getNameFromIP("127.0.0.1") - SQL error prepare: SQL logic error

[2021-04-16 19:58:00.140 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:58:00.140 18050M] getAliasclientIDfromIP("192.168.2.222") - SQL error prepare: SQL logic error

[2021-04-16 19:58:00.143 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:58:00.143 18050M] getNameFromIP("192.168.2.222") - SQL error prepare: SQL logic error

[2021-04-16 19:58:00.840 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067080;" (1)

[2021-04-16 19:58:00.840 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067080;" failed: SQL logic error

[2021-04-16 19:58:00.840 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 19:58:00.840 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 19:58:00.841 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 19:58:15.382 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:58:15.383 18050M] getAliasclientIDfromIP("192.168.2.238") - SQL error prepare: SQL logic error

[2021-04-16 19:58:15.385 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:58:15.386 18050M] getNameFromIP("192.168.2.238") - SQL error prepare: SQL logic error

[2021-04-16 19:58:34.791 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:58:34.791 18050M] getAliasclientIDfromIP("192.168.2.176") - SQL error prepare: SQL logic error

[2021-04-16 19:58:34.794 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:58:34.794 18050M] getNameFromIP("192.168.2.176") - SQL error prepare: SQL logic error

[2021-04-16 19:58:35.016 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:58:35.016 18050M] getNameFromIP("127.0.0.1") - SQL error prepare: SQL logic error

[2021-04-16 19:58:56.200 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:58:56.200 18050M] getNameFromIP("192.168.2.250") - SQL error prepare: SQL logic error

[2021-04-16 19:59:00.927 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067140;" (1)

[2021-04-16 19:59:00.927 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067140;" failed: SQL logic error

[2021-04-16 19:59:00.928 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 19:59:00.928 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 19:59:00.928 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 19:59:06.471 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:59:06.471 18050M] getNameFromIP("192.168.2.239") - SQL error prepare: SQL logic error

[2021-04-16 19:59:06.476 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:59:06.476 18050M] getNameFromIP("192.168.2.239") - SQL error prepare: SQL logic error

[2021-04-16 19:59:49.435 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 19:59:49.435 18050M] getAliasclientIDfromIP("192.168.2.212") - SQL error prepare: SQL logic error

[2021-04-16 19:59:49.439 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:59:49.439 18050M] getNameFromIP("192.168.2.212") - SQL error prepare: SQL logic error

[2021-04-16 19:59:50.102 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 19:59:50.102 18050M] getNameFromIP("127.0.0.1") - SQL error prepare: SQL logic error

[2021-04-16 20:00:00.012 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067200;" (1)

[2021-04-16 20:00:00.012 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067200;" failed: SQL logic error

[2021-04-16 20:00:00.012 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:00:00.012 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:00:00.012 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:00:01.136 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:00:01.136 18050M] getNameFromIP("192.168.2.250") - SQL error prepare: SQL logic error

[2021-04-16 20:00:02.391 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:00:02.391 18050M] getNameFromIP("192.168.2.238") - SQL error prepare: SQL logic error

[2021-04-16 20:00:59.286 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:00:59.287 18050M] getNameFromIP("192.168.2.176") - SQL error prepare: SQL logic error

[2021-04-16 20:00:59.292 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:00:59.292 18050M] getNameFromIP("192.168.2.176") - SQL error prepare: SQL logic error

[2021-04-16 20:01:00.098 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067260;" (1)

[2021-04-16 20:01:00.098 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067260;" failed: SQL logic error

[2021-04-16 20:01:00.098 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:01:00.098 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:01:00.098 18050/T18054] Error while trying to close database: bad parameter or other API misuse

Second (of two) parts of the relevant log-file sections:

[2021-04-16 20:01:00.098 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:01:00.098 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:01:00.098 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:01:16.169 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:01:16.169 18050M] getAliasclientIDfromIP("192.168.2.213") - SQL error prepare: SQL logic error

[2021-04-16 20:01:16.172 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:01:16.172 18050M] getNameFromIP("192.168.2.213") - SQL error prepare: SQL logic error

[2021-04-16 20:01:48.077 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:01:48.077 18050M] getAliasclientIDfromIP("192.168.2.207") - SQL error prepare: SQL logic error

[2021-04-16 20:01:48.079 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:01:48.080 18050M] getNameFromIP("192.168.2.207") - SQL error prepare: SQL logic error

[2021-04-16 20:02:00.184 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067320;" (1)

[2021-04-16 20:02:00.185 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067320;" failed: SQL logic error

[2021-04-16 20:02:00.185 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:02:00.185 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:02:00.185 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:02:10.157 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:02:10.158 18050M] getNameFromIP("192.168.2.210") - SQL error prepare: SQL logic error

[2021-04-16 20:02:10.163 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:02:10.163 18050M] getNameFromIP("192.168.2.210") - SQL error prepare: SQL logic error

[2021-04-16 20:02:10.168 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:02:10.169 18050M] getNameFromIP("192.168.2.210") - SQL error prepare: SQL logic error

[2021-04-16 20:02:15.818 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:02:15.818 18050M] getAliasclientIDfromIP("192.168.2.235") - SQL error prepare: SQL logic error

[2021-04-16 20:02:15.821 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:02:15.821 18050M] getNameFromIP("192.168.2.235") - SQL error prepare: SQL logic error

[2021-04-16 20:03:00.271 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067380;" (1)

[2021-04-16 20:03:00.271 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067380;" failed: SQL logic error

[2021-04-16 20:03:00.271 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:03:00.271 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:03:00.271 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:03:11.449 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:03:11.449 18050M] getAliasclientIDfromIP("192.168.2.242") - SQL error prepare: SQL logic error

[2021-04-16 20:03:11.452 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:03:11.452 18050M] getNameFromIP("192.168.2.242") - SQL error prepare: SQL logic error

[2021-04-16 20:03:13.609 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:03:13.610 18050M] getAliasclientIDfromIP("192.168.2.168") - SQL error prepare: SQL logic error

[2021-04-16 20:03:13.613 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:03:13.614 18050M] getNameFromIP("192.168.2.168") - SQL error prepare: SQL logic error

[2021-04-16 20:03:14.142 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:03:14.142 18050M] getAliasclientIDfromIP("192.168.2.216") - SQL error prepare: SQL logic error

[2021-04-16 20:03:14.145 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:03:14.145 18050M] getNameFromIP("192.168.2.216") - SQL error prepare: SQL logic error

[2021-04-16 20:03:21.574 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:03:21.574 18050M] getAliasclientIDfromIP("192.168.2.215") - SQL error prepare: SQL logic error

[2021-04-16 20:03:21.577 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:03:21.577 18050M] getNameFromIP("192.168.2.215") - SQL error prepare: SQL logic error

[2021-04-16 20:03:59.994 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:03:59.994 18050M] getNameFromIP("192.168.2.235") - SQL error prepare: SQL logic error

[2021-04-16 20:04:00.357 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067440;" (1)

[2021-04-16 20:04:00.357 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067440;" failed: SQL logic error

[2021-04-16 20:04:00.358 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:04:00.358 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:04:00.358 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:04:00.785 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:04:00.786 18050M] getAliasclientIDfromIP("192.168.2.233") - SQL error prepare: SQL logic error

[2021-04-16 20:04:00.788 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:04:00.789 18050M] getNameFromIP("192.168.2.233") - SQL error prepare: SQL logic error

[2021-04-16 20:04:01.551 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:04:01.551 18050M] getAliasclientIDfromIP("192.168.2.236") - SQL error prepare: SQL logic error

[2021-04-16 20:04:01.554 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:04:01.554 18050M] getNameFromIP("192.168.2.236") - SQL error prepare: SQL logic error

[2021-04-16 20:04:09.488 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:04:09.489 18050M] getNameFromIP("192.168.2.176") - SQL error prepare: SQL logic error

[2021-04-16 20:04:15.462 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:04:15.462 18050M] getNameFromIP("192.168.2.168") - SQL error prepare: SQL logic error

[2021-04-16 20:04:29.764 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:04:29.764 18050M] getAliasclientIDfromIP("192.168.2.240") - SQL error prepare: SQL logic error

[2021-04-16 20:04:29.767 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:04:29.767 18050M] getNameFromIP("192.168.2.240") - SQL error prepare: SQL logic error

[2021-04-16 20:05:00.444 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067500;" (1)

[2021-04-16 20:05:00.445 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067500;" failed: SQL logic error

[2021-04-16 20:05:00.445 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:05:00.445 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:05:00.445 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:06:00.532 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067560;" (1)

[2021-04-16 20:06:00.532 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067560;" failed: SQL logic error

[2021-04-16 20:06:00.532 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:06:00.532 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:06:00.532 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:06:19.346 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:06:19.346 18050M] getNameFromIP("192.168.2.233") - SQL error prepare: SQL logic error

[2021-04-16 20:06:19.352 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:06:19.352 18050M] getNameFromIP("192.168.2.233") - SQL error prepare: SQL logic error

[2021-04-16 20:06:35.105 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:06:35.105 18050M] getNameFromIP("192.168.2.168") - SQL error prepare: SQL logic error

[2021-04-16 20:06:35.112 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:06:35.112 18050M] getNameFromIP("192.168.2.168") - SQL error prepare: SQL logic error

[2021-04-16 20:07:00.618 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067620;" (1)

[2021-04-16 20:07:00.618 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067620;" failed: SQL logic error

[2021-04-16 20:07:00.618 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:07:00.618 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:07:00.618 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:07:03.878 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:07:03.879 18050M] getAliasclientIDfromIP("192.168.2.218") - SQL error prepare: SQL logic error

[2021-04-16 20:07:03.882 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:07:03.882 18050M] getNameFromIP("192.168.2.218") - SQL error prepare: SQL logic error

[2021-04-16 20:07:04.072 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:07:04.072 18050M] getNameFromIP("192.168.2.233") - SQL error prepare: SQL logic error

[2021-04-16 20:08:00.703 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067680;" (1)

[2021-04-16 20:08:00.703 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067680;" failed: SQL logic error

[2021-04-16 20:08:00.703 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:08:00.703 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:08:00.704 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:08:36.297 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:08:36.297 18050M] getNameFromIP("192.168.2.236") - SQL error prepare: SQL logic error

[2021-04-16 20:08:36.302 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:08:36.303 18050M] getNameFromIP("192.168.2.236") - SQL error prepare: SQL logic error

[2021-04-16 20:08:36.308 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:08:36.308 18050M] getNameFromIP("192.168.2.236") - SQL error prepare: SQL logic error

[2021-04-16 20:09:00.789 18050/T18054] SQLite3 message: no such column: name in "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067740;" (1)

[2021-04-16 20:09:00.789 18050/T18054] ERROR: SQL query "UPDATE network_addresses SET name = NULL WHERE nameUpdated < 1587067740;" failed: SQL logic error

[2021-04-16 20:09:00.790 18050/T18054] SQLite3 message: API call with invalid database connection pointer (21)

[2021-04-16 20:09:00.790 18050/T18054] SQLite3 message: misuse at line 165242 of [5d4c65779d] (21)

[2021-04-16 20:09:00.790 18050/T18054] Error while trying to close database: bad parameter or other API misuse

[2021-04-16 20:09:27.045 18050M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)

[2021-04-16 20:09:27.046 18050M] getAliasclientIDfromIP("192.168.2.246") - SQL error prepare: SQL logic error

[2021-04-16 20:09:27.048 18050M] SQLite3 message: no such column: name in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)

[2021-04-16 20:09:27.049 18050M] getNameFromIP("192.168.2.246") - SQL error prepare: SQL logic error

[2021-04-16 20:09:57.137 18050M] Shutting down...

[2021-04-16 20:09:57.388 18050M] Asking threads to cancel

[2021-04-16 20:09:57.388 18050M] Waiting for threads to join

[2021-04-16 20:09:57.389 18050M] All threads joined

[2021-04-16 20:09:57.391 18050M] ########## FTL terminated after 13m 26s (code 0)! ##########

[2021-04-16 20:09:58.438 18485M] Using log file /var/log/pihole-FTL.log

[2021-04-16 20:09:58.438 18485M] ########## FTL started! ##########

[2021-04-16 20:09:58.439 18485M] FTL branch: master

[2021-04-16 20:09:58.439 18485M] FTL version: v5.8

[2021-04-16 20:09:58.439 18485M] FTL commit: bdaff4bf

[2021-04-16 20:09:58.439 18485M] FTL date: 2021-04-14 18:52:20 +0100

[2021-04-16 20:09:58.439 18485M] FTL user: pihole

[2021-04-16 20:09:58.439 18485M] Compiled for armv7hf (compiled on CI) using arm-linux-gnueabihf-gcc (Debian 6.3.0-18) 6.3.0 20170516

[2021-04-16 20:09:58.439 18485M] Creating mutex

[2021-04-16 20:09:58.441 18485M] Starting config file parsing (/etc/pihole/pihole-FTL.conf)

[2021-04-16 20:09:58.441 18485M] SOCKET_LISTENING: only local

[2021-04-16 20:09:58.441 18485M] AAAA_QUERY_ANALYSIS: Show AAAA queries

[2021-04-16 20:09:58.441 18485M] MAXDBDAYS: max age for stored queries is 365 days

[2021-04-16 20:09:58.441 18485M] RESOLVE_IPV6: Resolve IPv6 addresses

[2021-04-16 20:09:58.441 18485M] RESOLVE_IPV4: Resolve IPv4 addresses

[2021-04-16 20:09:58.441 18485M] DBINTERVAL: saving to DB file every minute

[2021-04-16 20:09:58.441 18485M] DBFILE: Using /etc/pihole/pihole-FTL.db

[2021-04-16 20:09:58.441 18485M] MAXLOGAGE: Importing up to 24.0 hours of log data

[2021-04-16 20:09:58.441 18485M] PRIVACYLEVEL: Set to 0

[2021-04-16 20:09:58.441 18485M] IGNORE_LOCALHOST: Show queries from localhost

[2021-04-16 20:09:58.441 18485M] BLOCKINGMODE: Null IPs for blocked domains

[2021-04-16 20:09:58.441 18485M] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries

[2021-04-16 20:09:58.441 18485M] DBIMPORT: Importing history from database

[2021-04-16 20:09:58.441 18485M] PIDFILE: Using /run/pihole-FTL.pid

[2021-04-16 20:09:58.441 18485M] PORTFILE: Using /run/pihole-FTL.port

[2021-04-16 20:09:58.441 18485M] SOCKETFILE: Using /run/pihole/FTL.sock

[2021-04-16 20:09:58.441 18485M] SETUPVARSFILE: Using /etc/pihole/setupVars.conf

[2021-04-16 20:09:58.442 18485M] MACVENDORDB: Using /etc/pihole/macvendor.db

[2021-04-16 20:09:58.442 18485M] GRAVITYDB: Using /etc/pihole/gravity.db

[2021-04-16 20:09:58.442 18485M] PARSE_ARP_CACHE: Active

[2021-04-16 20:09:58.442 18485M] CNAME_DEEP_INSPECT: Active

[2021-04-16 20:09:58.442 18485M] DELAY_STARTUP: No delay requested.

[2021-04-16 20:09:58.442 18485M] BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}

[2021-04-16 20:09:58.442 18485M] NICE: Set process niceness to -10 (default)

[2021-04-16 20:09:58.442 18485M] MAXNETAGE: Removing IP addresses and host names from network table after 365 days

[2021-04-16 20:09:58.442 18485M] NAMES_FROM_NETDB: Enabled, trying to get names from network database

[2021-04-16 20:09:58.442 18485M] EDNS0_ECS: Overwrite client from ECS information

[2021-04-16 20:09:58.442 18485M] REFRESH_HOSTNAMES: Periodically refreshing IPv4 names

[2021-04-16 20:09:58.442 18485M] RATE_LIMIT: Rate-limiting client making more than 1000 queries in 60 seconds

[2021-04-16 20:09:58.442 18485M] REPLY_ADDR4: Automatic interface-dependent detection of address

[2021-04-16 20:09:58.442 18485M] REPLY_ADDR6: Automatic interface-dependent detection of address

[2021-04-16 20:09:58.442 18485M] Finished config file parsing

[2021-04-16 20:09:58.443 18485M] Database version is 7

[2021-04-16 20:09:58.443 18485M] Updating long-term database to version 8

[2021-04-16 20:09:58.489 18485M] Updating long-term database to version 9

[2021-04-16 20:09:58.580 18485M] Imported 0 alias-clients

[2021-04-16 20:09:58.581 18485M] Database successfully initialized

[2021-04-16 20:09:58.581 18485M] Imported 0 queries from the long-term database

[2021-04-16 20:09:58.581 18485M] -> Total DNS queries: 0

[2021-04-16 20:09:58.581 18485M] -> Cached DNS queries: 0

[2021-04-16 20:09:58.581 18485M] -> Forwarded DNS queries: 0

[2021-04-16 20:09:58.581 18485M] -> Blocked DNS queries: 0

[2021-04-16 20:09:58.581 18485M] -> Unknown DNS queries: 0

[2021-04-16 20:09:58.581 18485M] -> Unique domains: 0

[2021-04-16 20:09:58.582 18485M] -> Unique clients: 0

[2021-04-16 20:09:58.582 18485M] -> Known forward destinations: 0

[2021-04-16 20:09:58.582 18485M] Successfully accessed setupVars.conf

[2021-04-16 20:09:58.589 18487M] PID of FTL process: 18487

[2021-04-16 20:09:58.589 18487/T18488] Listening on port 4711 for incoming IPv4 telnet connections

[2021-04-16 20:09:58.590 18487M] INFO: FTL is running as user pihole (UID 999)

[2021-04-16 20:09:58.590 18487/T18489] Listening on port 4711 for incoming IPv6 telnet connections

[2021-04-16 20:09:58.590 18487/T18490] Listening on Unix socket

[2021-04-16 20:09:58.590 18487M] Reloading DNS cache

[2021-04-16 20:09:58.591 18487M] Blocking status is enabled

[2021-04-16 20:09:58.763 18487M] Resizing "FTL-strings" from 40960 to (81920 * 1) == 81920 (/dev/shm: 1.0MB used, 484.6MB total, FTL uses 1.0MB)

[2021-04-16 20:09:58.765 18487M] New upstream server: 149.112.112.112:53 (0/1024)

[2021-04-16 20:09:59.141 18487M] New upstream server: 9.9.9.9:53 (1/1024)

[2021-04-16 20:09:59.636 18487/T18491] Compiled 0 whitelist and 0 blacklist regex filters for 1 clients in 1.0 msec

[2021-04-16 20:15:51.670 18487M] Resizing "FTL-dns-cache" from 4096 to (512 * 16) == 8192 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.0MB)

[2021-04-16 20:28:38.866 18487M] Resizing "FTL-domains" from 4096 to (512 * 16) == 8192 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.1MB)

[2021-04-16 20:44:05.791 18487M] Resizing "FTL-dns-cache" from 8192 to (768 * 16) == 12288 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.1MB)

[2021-04-16 21:41:31.947 18487M] Resizing "FTL-dns-cache" from 12288 to (1024 * 16) == 16384 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.1MB)

[2021-04-16 22:08:30.165 18487M] Resizing "FTL-domains" from 8192 to (768 * 16) == 12288 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.1MB)

[2021-04-16 22:08:34.330 18487M] Resizing "FTL-dns-cache" from 16384 to (1280 * 16) == 20480 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.1MB)

[2021-04-16 22:27:38.760 18487M] Resizing "FTL-queries" from 229376 to (8192 * 56) == 458752 (/dev/shm: 1.1MB used, 484.6MB total, FTL uses 1.1MB)

[2021-04-16 23:07:08.157 18487M] Resizing "FTL-dns-cache" from 20480 to (1536 * 16) == 24576 (/dev/shm: 1.3MB used, 484.6MB total, FTL uses 1.3MB)

pi@rpihome:/var/log $

Greetings,
Glad to know I'm not the only one who had this issue. I have pihole -up set on a every-other-day crontab to keep it updated. There's no issues at ALL in the log files until this. Since then it is non-stop errors in the db and dns crashes out every few hours. A pihole -g -r gets things working again (I have it in a hourly cron which seems to keep things working) but the errors persist. I haven't tried wiping the DB yet. Slightly scared about losing all the custom rules I have in place. It looks like the DB upgrade script failed out. Also, the DB is stored on a ext4 hard drive, not the SD card. The drive and the filesystem check out. I really think this was a failed update.

NOTE: 2021-04-15 01:10:30 is when cron kicked off `pihole -up`

[2021-04-15 01:11:41.924 10506M] Shutting down...
[2021-04-15 01:11:41.926 10506M] dbquery("BEGIN TRANSACTION IMMEDIATE") called but database is not available!
[2021-04-15 01:11:41.926 10506M] ERROR: Storing queries in long-term database failed: SQL logic error
[2021-04-15 01:11:41.926 10506M] Finished final database update
[2021-04-15 01:11:41.998 10506M] ########## FTL terminated after 14d 4h 25m 56s ! ##########
[2021-04-15 01:11:45.350 3980M] Using log file /var/log/pihole-FTL.log
[2021-04-15 01:11:45.351 3980M] ########## FTL started! ##########
[2021-04-15 01:11:45.351 3980M] FTL branch: master
[2021-04-15 01:11:45.351 3980M] FTL version: v5.8
[2021-04-15 01:11:45.351 3980M] FTL commit: bdaff4bf
[2021-04-15 01:11:45.351 3980M] FTL date: 2021-04-14 18:52:20 +0100
[2021-04-15 01:11:45.351 3980M] FTL user: pihole
[2021-04-15 01:11:45.351 3980M] Compiled for x86_64 (compiled on CI) using gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
[2021-04-15 01:11:45.352 3980M] Creating mutex
[2021-04-15 01:11:45.354 3980M] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2021-04-15 01:11:45.354 3980M]    SOCKET_LISTENING: only local
[2021-04-15 01:11:45.354 3980M]    AAAA_QUERY_ANALYSIS: Show AAAA queries
[2021-04-15 01:11:45.355 3980M]    MAXDBDAYS: max age for stored queries is 365 days
[2021-04-15 01:11:45.355 3980M]    RESOLVE_IPV6: Resolve IPv6 addresses
[2021-04-15 01:11:45.355 3980M]    RESOLVE_IPV4: Resolve IPv4 addresses
[2021-04-15 01:11:45.355 3980M]    DBINTERVAL: saving to DB file every minute
[2021-04-15 01:11:45.355 3980M]    DBFILE: Using /etc/pihole/pihole-FTL.db
[2021-04-15 01:11:45.355 3980M]    MAXLOGAGE: Importing up to 24.0 hours of log data
[2021-04-15 01:11:45.355 3980M]    PRIVACYLEVEL: Set to 0
[2021-04-15 01:11:45.355 3980M]    IGNORE_LOCALHOST: Show queries from localhost
[2021-04-15 01:11:45.356 3980M]    BLOCKINGMODE: Null IPs for blocked domains
[2021-04-15 01:11:45.356 3980M]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2021-04-15 01:11:45.356 3980M]    DBIMPORT: Importing history from database
[2021-04-15 01:11:45.356 3980M]    PIDFILE: Using /run/pihole-FTL.pid
[2021-04-15 01:11:45.356 3980M]    PORTFILE: Using /run/pihole-FTL.port
[2021-04-15 01:11:45.356 3980M]    SOCKETFILE: Using /run/pihole/FTL.sock
[2021-04-15 01:11:45.357 3980M]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2021-04-15 01:11:45.357 3980M]    MACVENDORDB: Using /etc/pihole/macvendor.db
[2021-04-15 01:11:45.357 3980M]    GRAVITYDB: Using /etc/pihole/gravity.db
[2021-04-15 01:11:45.357 3980M]    PARSE_ARP_CACHE: Active
[2021-04-15 01:11:45.357 3980M]    CNAME_DEEP_INSPECT: Active
[2021-04-15 01:11:45.357 3980M]    DELAY_STARTUP: No delay requested.
[2021-04-15 01:11:45.357 3980M]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2021-04-15 01:11:45.357 3980M]    NICE: Set process niceness to -10 (default)
[2021-04-15 01:11:45.357 3980M]    MAXNETAGE: Removing IP addresses and host names from network table after 365 days
[2021-04-15 01:11:45.358 3980M]    NAMES_FROM_NETDB: Enabled, trying to get names from network database
[2021-04-15 01:11:45.358 3980M]    EDNS0_ECS: Overwrite client from ECS information
[2021-04-15 01:11:45.358 3980M]    REFRESH_HOSTNAMES: Periodically refreshing IPv4 names
[2021-04-15 01:11:45.358 3980M]    RATE_LIMIT: Rate-limiting client making more than 1000 queries in 60 seconds
[2021-04-15 01:11:45.358 3980M]    REPLY_ADDR4: Automatic interface-dependent detection of address
[2021-04-15 01:11:45.358 3980M]    REPLY_ADDR6: Automatic interface-dependent detection of address
[2021-04-15 01:11:45.358 3980M] Finished config file parsing
[2021-04-15 01:11:45.361 3980M] Database version is 9
[2021-04-15 01:11:45.361 3980M] Imported 0 alias-clients
[2021-04-15 01:11:45.361 3980M] Database successfully initialized
[2021-04-15 01:11:45.363 3980M] SQLite3 message: database corruption at line 67183 of [5d4c65779d] (11)
[2021-04-15 01:11:45.363 3980M] SQLite3 message: statement aborts at 6: [SELECT * FROM queries WHERE timestamp >= ?] database disk image is malformed (11)
[2021-04-15 01:11:45.363 3980M] Imported 0 queries from the long-term database
[2021-04-15 01:11:45.363 3980M] DB_read_queries() - SQL error step: database disk image is malformed
[2021-04-15 01:11:45.363 3980M] Error while trying to close database: database is locked
[2021-04-15 01:11:45.363 3980M]  -> Total DNS queries: 0
[2021-04-15 01:11:45.363 3980M]  -> Cached DNS queries: 0
[2021-04-15 01:11:45.363 3980M]  -> Forwarded DNS queries: 0
[2021-04-15 01:11:45.364 3980M]  -> Blocked DNS queries: 0
[2021-04-15 01:11:45.364 3980M]  -> Unknown DNS queries: 0
[2021-04-15 01:11:45.364 3980M]  -> Unique domains: 0
[2021-04-15 01:11:45.364 3980M]  -> Unique clients: 0
[2021-04-15 01:11:45.364 3980M]  -> Known forward destinations: 0
[2021-04-15 01:11:45.364 3980M] Successfully accessed setupVars.conf
[2021-04-15 01:11:45.376 3982M] PID of FTL process: 3982
[2021-04-15 01:11:45.379 3982M] INFO: FTL is running as user pihole (UID 995)
[2021-04-15 01:11:45.378 3982/T3984] Listening on port 4711 for incoming IPv6 telnet connections
[2021-04-15 01:11:45.383 3982M] Reloading DNS cache
[2021-04-15 01:11:45.383 3982M] Blocking status is enabled
[2021-04-15 01:11:45.383 3982/T3985] Listening on Unix socket
[2021-04-15 01:11:45.379 3982/T3983] Listening on port 4711 for incoming IPv4 telnet connections
[2021-04-15 01:11:46.384 3982/T3986] Resizing "FTL-strings" from 40960 to (81920 * 1) == 81920 (/dev/shm: 720.9KB used, 2.0GB total, FTL uses 708.9KB)
[2021-04-15 01:11:46.397 3982/T3986] Compiled 1 whitelist and 14 blacklist regex filters for 0 clients in 3.0 msec
[2021-04-15 01:11:46.942 3982M] New upstream server: 81.3.27.54:53 (0/512)
[2021-04-15 01:12:00.414 3982/T3986] SQLite3 message: database corruption at line 67183 of [5d4c65779d] (11)
[2021-04-15 01:12:00.414 3982/T3986] SQLite3 message: statement aborts at 3: [SELECT MAX(ID) FROM queries] database disk image is malformed (11)
[2021-04-15 01:12:00.414 3982/T3986] Encountered step error in get_max_query_ID(): database disk image is malformed
[2021-04-15 01:12:00.414 3982/T3986] Error while trying to close database: database is locked
[2021-04-15 01:12:00.416 3982/T3986] SQLite3 message: database corruption at line 67183 of [5d4c65779d] (11)
[2021-04-15 01:12:00.416 3982/T3986] SQLite3 message: statement aborts at 11: [INSERT INTO queries VALUES (NULL,?,?,?,?,?,?,?)] database disk image is malformed (11)
[2021-04-15 01:12:00.416 3982/T3986] Encountered error while trying to store queries in long-term database: database disk image is malformed
[2021-04-15 01:12:00.585 3982/T3986] Error while trying to close database: database is locked

Don't do this. For sure there will be an update with breaking changes that will crash your DNS resolution. Read the changelog first, then update under supervision.


__

I'm not sure why we see so many corrupted databases right now....


The malformated database is pihole-FTL.db which is the long-term database. Your rules are stored in gravity.db

1 Like

Thanks! I stopped pihole, moved the db to a .bkp, and restarted the service. No issues nor warnings now for the last 12 hours.

I'm having the same issue. Just upgraded a few days ago and I'm having to restart service probably every day.

https://tricorder.pi-hole.net/8r1v37osos

We see many errors like

   [2021-04-20 00:01:00.541 519/T523] SQLite3 message: database corruption at line 66843 of [5d4c65779d] (11)

in your log. Can you identify the first error of this kind? Like going back in /var/log/pihole-FTL.log.* and checking when the first error happened. What log lines are around there?

Looks like my logs already cycled and only go back to 4/20, so thats the earliest I have. I've already extracted the gz's that were there, and thats as far back as I got.

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