Config File migration seems to have failed, /etc/pihole/pihole.toml doesn't exist. pihole -v shows wrong information
pi@pihole1:~ $ pihole -v
Core version is v5.18.4 (Latest: v5.18.4)
Web version is v5.21 (Latest: v5.21)
FTL version is v5.25.2 (Latest: v5.25.2)
But pihole -up thinks v6 is installed.
pi@pihole1:~ $ sudo pihole -up
[✓] Supported OS detected
[✓] Update local cache of available packages
[✓] Building dependency package pihole-meta.deb
[✓] Installing Pi-hole dependency package
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date
[✓] Everything is up to date!
2025-02-18 14:42:24.207 EST [30842M] INFO: ########## FTL started on pihole1! ##########
2025-02-18 14:42:24.207 EST [30842M] INFO: FTL branch: master
2025-02-18 14:42:24.207 EST [30842M] INFO: FTL version: v6.0
2025-02-18 14:42:24.207 EST [30842M] INFO: FTL commit: eaa7dbb4
2025-02-18 14:42:24.207 EST [30842M] INFO: FTL date: 2025-02-18 17:19:26 +0000
2025-02-18 14:42:24.207 EST [30842M] INFO: FTL user: pihole
2025-02-18 14:42:24.207 EST [30842M] INFO: Compiled for linux/arm/v6 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2025-02-18 14:42:24.208 EST [30842M] INFO: Config file /etc/pihole/pihole.toml not available (r): No such file or directory
2025-02-18 14:42:24.208 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.1 not available (r): No such file or directory
2025-02-18 14:42:24.208 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.2 not available (r): No such file or directory
2025-02-18 14:42:24.208 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.3 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.4 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.5 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.6 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.7 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.8 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.9 not available (r): No such file or directory
2025-02-18 14:42:24.209 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.10 not available (r): No such file or directory
2025-02-18 14:42:24.210 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.11 not available (r): No such file or directory
2025-02-18 14:42:24.210 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.12 not available (r): No such file or directory
2025-02-18 14:42:24.210 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.13 not available (r): No such file or directory
2025-02-18 14:42:24.210 EST [30842M] INFO: Config backup file /etc/pihole/config_backups/pihole.toml.14 not available (r): No such file or directory
2025-02-18 14:42:24.210 EST [30842M] INFO: No config file nor backup available, using defaults
2025-02-18 14:42:24.211 EST [30842M] INFO: Config initialized with webserver ports 80 (HTTP) and 443 (HTTPS), IPv6 support is enabled
2025-02-18 14:42:24.215 EST [30842M] INFO: Wrote config file:
2025-02-18 14:42:24.215 EST [30842M] INFO: - 152 total entries
2025-02-18 14:42:24.215 EST [30842M] INFO: - 151 entries are default
2025-02-18 14:42:24.215 EST [30842M] INFO: - 1 entry is modified
2025-02-18 14:42:24.215 EST [30842M] INFO: - 0 entries are forced through environment
2025-02-18 14:42:24.216 EST [30842M] INFO: Config file written to /etc/pihole/pihole.toml
2025-02-18 14:42:24.221 EST [30842M] INFO: PID file does not exist or not readable
2025-02-18 14:42:24.221 EST [30842M] INFO: No other running FTL process found.
2025-02-18 14:42:24.228 EST [30842M] INFO: PID of FTL process: 30842
2025-02-18 14:42:24.229 EST [30842M] INFO: listening on 0.0.0.0 port 53
2025-02-18 14:42:24.230 EST [30842M] INFO: listening on :: port 53
2025-02-18 14:42:24.232 EST [30842M] INFO: PID of FTL process: 30842
2025-02-18 14:42:24.238 EST [30842M] INFO: Database version is 12
2025-02-18 14:42:24.239 EST [30842M] INFO: Updating long-term database to version 13
2025-02-18 14:42:24.265 EST [30842M] INFO: Updating long-term database to version 14
2025-02-18 14:42:24.276 EST [30842M] INFO: Updating long-term database to version 15
2025-02-18 14:42:24.295 EST [30842M] INFO: Updating long-term database to version 16
2025-02-18 14:42:24.311 EST [30842M] INFO: Updating long-term database to version 17
2025-02-18 14:42:24.332 EST [30842M] INFO: Updating long-term database to version 18
2025-02-18 14:42:24.350 EST [30842M] INFO: Updating long-term database to version 19
2025-02-18 14:42:24.366 EST [30842M] INFO: Updating long-term database to version 20
2025-02-18 14:42:24.393 EST [30842M] INFO: Updating long-term database to version 21
2025-02-18 14:42:24.408 EST [30842M] INFO: Database successfully initialized
2025-02-18 14:43:15.617 EST [30842M] INFO: Imported 28366 queries from the on-disk database (it has 21722041 rows)
2025-02-18 14:43:15.618 EST [30842M] INFO: Parsing queries in database
2025-02-18 14:43:15.941 EST [30842M] INFO: 10000 queries parsed...
2025-02-18 14:43:16.251 EST [30842M] INFO: 20000 queries parsed...
2025-02-18 14:43:16.447 EST [30842M] INFO: Imported 28366 queries from the long-term database
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Total DNS queries: 28366
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Cached DNS queries: 13620
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Forwarded DNS queries: 11380
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Blocked DNS queries: 3258
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Unknown DNS queries: 0
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Unique domains: 1025
2025-02-18 14:43:16.447 EST [30842M] INFO: -> Unique clients: 15
2025-02-18 14:43:16.447 EST [30842M] INFO: -> DNS cache records: 0
2025-02-18 14:43:16.448 EST [30842M] INFO: -> Known forward destinations: 2
2025-02-18 14:43:17.538 EST [30842M] INFO: FTL is running as user pihole (UID 999)
2025-02-18 14:43:17.570 EST [30842M] INFO: Created SSL/TLS certificate for pi.hole at /etc/pihole/tls.pem
2025-02-18 14:43:17.570 EST [30842M] INFO: Reading certificate from /etc/pihole/tls.pem ...
2025-02-18 14:43:17.570 EST [30842M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2025-02-18 14:43:17.572 EST [30842M] INFO: Web server ports:
2025-02-18 14:43:17.572 EST [30842M] INFO: - 80 (HTTP, IPv4, optional)
2025-02-18 14:43:17.572 EST [30842M] INFO: - 443 (HTTPS, IPv4, optional)
2025-02-18 14:43:17.572 EST [30842M] INFO: - 80 (HTTP, IPv6, optional)
2025-02-18 14:43:17.572 EST [30842M] INFO: - 443 (HTTPS, IPv6, optional)
2025-02-18 14:43:17.573 EST [30842M] INFO: Restored 0 API sessions from the database
2025-02-18 14:43:17.605 EST [30842M] WARNING: WARNING in dnsmasq core: no upstream servers configured
2025-02-18 14:43:17.610 EST [30842M] INFO: Blocking status is enabled
2025-02-18 14:43:17.751 EST [30842/T30871] INFO: Compiled 1 allow and 0 deny regex for 15 clients in 97.9 msec
2025-02-18 14:43:17.751 EST [30842/T30871] WARNING: List with ID 39 (https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser) was inaccessible during last gravity run
2025-02-18 14:43:18.121 EST [30842M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-02-18 14:43:18.122 EST [30842M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
2025-02-18 14:43:18.140 EST [30842M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-02-18 14:43:18.140 EST [30842M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
2025-02-18 14:43:18.141 EST [30842M] ERROR: Gravity database not available (allowlist)
2025-02-18 14:43:22.116 EST [30842/T30870] WARNING: Warning NTP client: No valid NTP replies received, check server and network connectivity
2025-02-18 14:43:22.120 EST [30842/T30870] INFO: Local time is too inaccurate, retrying in 600 seconds before launching NTP server
2025-02-18 14:45:47.487 EST [30842/T30898] WARNING: API: Bad request (The API is hosted at pi.hole/api, not pi.hole/admin/api)
2025-02-18 14:45:47.519 EST [30842/T30898] WARNING: API: Bad request (The API is hosted at pi.hole/api, not pi.hole/admin/api)
I am able to access the Admin interface. I had previously set Unbound (127.0.0.1#5335) as my upstream, it seems to have lost that config option. I put it back.
Nope, but I can do a Teleporter export from my other pihole instance. Everything appears to be working fine at the moment. Going to wait a week or so before upgrading my second node.
Have a look at FTL.log from time to time and see if the SQL errors persist
2025-02-18 14:43:18.121 EST [30842M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-02-18 14:43:18.122 EST [30842M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
2025-02-18 14:43:18.140 EST [30842M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-02-18 14:43:18.140 EST [30842M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
2025-02-18 14:43:18.141 EST [30842M] ERROR: Gravity database not available (allowlist)
So it crashed after I tried to bring in my Teleporter backup from my primary PiHole instance, and it reverted the pihole.toml to defaults.
2025-02-18 15:23:34.376 EST [31718/T31736] WARNING: List with ID 39 (https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser) was inaccessible during last gravity run
2025-02-18 15:23:35.866 EST [31718M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-02-18 15:23:35.867 EST [31718M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
2025-02-18 15:23:35.885 EST [31718M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-02-18 15:23:35.885 EST [31718M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
2025-02-18 15:23:35.886 EST [31718M] ERROR: Gravity database not available (allowlist)
2025-02-18 15:28:02.754 EST [31718/T31753] WARNING: API: Could not read domains from database table (Database not available)
2025-02-18 15:28:13.448 EST [31718/T31753] INFO: import_json_table(adlist.json): JSON array contains 32 entries
2025-02-18 15:28:13.510 EST [31718/T31753] INFO: import_json_table(adlist_by_group.json): JSON array contains 32 entries
2025-02-18 15:28:13.529 EST [31718/T31753] INFO: import_json_table(blacklist.exact.json): JSON array contains 0 entries
2025-02-18 15:28:13.535 EST [31718/T31753] INFO: import_json_table(blacklist.regex.json): JSON array contains 0 entries
2025-02-18 15:28:13.540 EST [31718/T31753] INFO: import_json_table(client.json): JSON array contains 4 entries
2025-02-18 15:28:13.569 EST [31718/T31753] INFO: import_json_table(client_by_group.json): JSON array contains 6 entries
2025-02-18 15:28:13.591 EST [31718/T31753] INFO: import_json_table(domainlist_by_group.json): JSON array contains 7 entries
2025-02-18 15:28:13.625 EST [31718/T31753] INFO: import_json_table(group.json): JSON array contains 3 entries
2025-02-18 15:28:13.642 EST [31718/T31753] INFO: import_json_table(whitelist.exact.json): JSON array contains 6 entries
2025-02-18 15:28:13.665 EST [31718/T31753] INFO: import_json_table(whitelist.regex.json): JSON array contains 1 entry
2025-02-18 15:28:13.690 EST [31718/T31753] INFO: Writing file "custom.list" (108 bytes) to "/etc/pihole/custom.list"
2025-02-18 15:28:13.699 EST [31718/T31753] INFO: Writing file "pihole-FTL.conf" (1485 bytes) to "/etc/pihole/pihole-FTL.conf"
2025-02-18 15:28:13.700 EST [31718/T31753] INFO: Writing file "setupVars.conf" (725 bytes) to "/etc/pihole/setupVars.conf"
2025-02-18 15:28:13.712 EST [31718/T31753] INFO: Migrating config to Pi-hole v6.0 format
2025-02-18 15:28:13.713 EST [31718/T31753] INFO: Reading legacy config files from /etc/pihole/pihole-FTL.conf
2025-02-18 15:28:13.713 EST [31718/T31753] INFO: WEBROOT: Empty path is not possible, using default
2025-02-18 15:28:13.714 EST [31718/T31753] INFO: WEBHOME: Empty path is not possible, using default
2025-02-18 15:28:13.714 EST [31718/T31753] INFO: API_INFO_LOG: Empty path is not possible, using default
2025-02-18 15:28:13.714 EST [31718/T31753] INFO: WEBDOMAIN: Empty path is not possible, using default
2025-02-18 15:28:13.715 EST [31718/T31753] ERROR: Debug config item with index 255 requested but we have only 29 debug elements
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: ----------------------------> FTL crashed! <----------------------------
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: and include in your report already the following details:
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: FTL has been running for 330 seconds
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: FTL branch: master
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: FTL version: v6.0
2025-02-18 15:28:13.717 EST [31718/T31753] INFO: FTL commit: eaa7dbb4
2025-02-18 15:28:13.718 EST [31718/T31753] INFO: FTL date: 2025-02-18 17:19:26 +0000
2025-02-18 15:28:13.728 EST [31718/T31753] INFO: FTL user: started as pihole, ended as pihole
2025-02-18 15:28:13.728 EST [31718/T31753] INFO: Compiled for linux/arm/v6 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2025-02-18 15:28:13.728 EST [31718/T31753] INFO: Process details: MID: 31718
2025-02-18 15:28:13.728 EST [31718/T31753] INFO: PID: 31718
2025-02-18 15:28:13.728 EST [31718/T31753] INFO: TID: 31753
2025-02-18 15:28:13.728 EST [31718/T31753] INFO: Name: civetweb-worker
2025-02-18 15:28:13.729 EST [31718/T31753] INFO: Received signal: Segmentation fault
2025-02-18 15:28:13.729 EST [31718/T31753] INFO: at address: 0x18
2025-02-18 15:28:13.729 EST [31718/T31753] INFO: with code: SEGV_MAPERR (Address not mapped to object)
2025-02-18 15:28:13.729 EST [31718/T31753] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2025-02-18 15:28:13.729 EST [31718/T31753] INFO: ------ Listing content of directory /dev/shm ------
2025-02-18 15:28:13.729 EST [31718/T31753] INFO: File Mode User:Group Size Filename
2025-02-18 15:28:13.732 EST [31718/T31753] INFO: rwxrwxrwx root:root 360 .
2025-02-18 15:28:13.733 EST [31718/T31753] INFO: rwxr-xr-x root:root 4K ..
2025-02-18 15:28:13.733 EST [31718/T31753] INFO: rw------- pihole:pihole 786K FTL-31718-recycler
2025-02-18 15:28:13.733 EST [31718/T31753] INFO: rw------- pihole:pihole 4K FTL-31718-dns-cache-lookup
2025-02-18 15:28:13.734 EST [31718/T31753] INFO: rw------- pihole:pihole 12K FTL-31718-domains-lookup
2025-02-18 15:28:13.734 EST [31718/T31753] INFO: rw------- pihole:pihole 4K FTL-31718-clients-lookup
2025-02-18 15:28:13.734 EST [31718/T31753] INFO: rw------- pihole:pihole 560K FTL-31718-fifo-log
2025-02-18 15:28:13.734 EST [31718/T31753] INFO: rw------- pihole:pihole 4K FTL-31718-per-client-regex
2025-02-18 15:28:13.735 EST [31718/T31753] INFO: rw------- pihole:pihole 20K FTL-31718-dns-cache
2025-02-18 15:28:13.735 EST [31718/T31753] INFO: rw------- pihole:pihole 8K FTL-31718-overTime
2025-02-18 15:28:13.737 EST [31718/T31753] INFO: rw------- pihole:pihole 2M FTL-31718-queries
2025-02-18 15:28:13.737 EST [31718/T31753] INFO: rw------- pihole:pihole 12K FTL-31718-upstreams
2025-02-18 15:28:13.738 EST [31718/T31753] INFO: rw------- pihole:pihole 340K FTL-31718-clients
2025-02-18 15:28:13.738 EST [31718/T31753] INFO: rw------- pihole:pihole 37K FTL-31718-domains
2025-02-18 15:28:13.738 EST [31718/T31753] INFO: rw------- pihole:pihole 82K FTL-31718-strings
2025-02-18 15:28:13.739 EST [31718/T31753] INFO: rw------- pihole:pihole 136 FTL-31718-settings
2025-02-18 15:28:13.739 EST [31718/T31753] INFO: rw------- pihole:pihole 328 FTL-31718-counters
2025-02-18 15:28:13.739 EST [31718/T31753] INFO: rw------- pihole:pihole 56 FTL-31718-lock
2025-02-18 15:28:13.739 EST [31718/T31753] INFO: ---------------------------------------------------
2025-02-18 15:28:13.739 EST [31718/T31753] INFO: Please also include some lines from above the !!!!!!!!! header.
2025-02-18 15:28:13.740 EST [31718/T31753] INFO: Thank you for helping us to improve our FTL engine!
2025-02-18 15:28:13.740 EST [31718/T31753] INFO: Waiting for threads to join
2025-02-18 15:28:13.749 EST [31718/T31739] INFO: Terminating timer thread
2025-02-18 15:28:14.229 EST [31718/T31738] INFO: Terminating resolver thread
2025-02-18 15:28:15.741 EST [31718/T31753] INFO: Thread database (0) is still busy, cancelling it.
2025-02-18 15:28:15.742 EST [31718/T31754] ERROR: Error when obtaining outer SHM lock: Previous owner died
2025-02-18 15:28:15.742 EST [31718/T31754] ERROR: Error when obtaining inner SHM lock: Previous owner died
2025-02-18 15:28:15.743 EST [31718/T31737] INFO: Terminating GC thread
2025-02-18 15:28:15.743 EST [31718/T31753] INFO: All threads joined
2025-02-18 15:28:15.746 EST [31718/T31753] INFO: PID file emptied
2025-02-18 15:28:15.750 EST [31718/T31753] INFO: Stored 0 API sessions in the database
and provide the backtrace information after such a crash. If you see pihole-FTL stop due to anything else than a crash, please tell us this as well and just go on running it using the command continue.
Thread 10 "civetweb-worker" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 9008]
0x00307f4c in setDebugOption (fp=0x71622070, option=0x4a6ad4 "DEBUG_ALL", flag=255) at /app/src/config/legacy_reader.c:818
818 /app/src/config/legacy_reader.c: No such file or directory.
Backtrace output
(gdb) backtrace
#0 0x00307f4c in setDebugOption (fp=0x71622070, option=0x4a6ad4 "DEBUG_ALL", flag=255) at /app/src/config/legacy_reader.c:818
#1 readDebugingSettingsLegacy (fp=0x71622070) at /app/src/config/legacy_reader.c:841
#2 readFTLlegacy (conf=<optimized out>) at /app/src/config/legacy_reader.c:588
#3 0x00300648 in migrate_config_v6 () at /app/src/config/config.c:1685
#4 0x00062004 in process_received_tar_gz (api=0x716768e0, data=0x71676790) at /app/src/api/teleporter.c:846
#5 api_teleporter_POST (api=0x716768e0) at /app/src/api/teleporter.c:294
#6 api_teleporter (api=0x716768e0) at /app/src/api/teleporter.c:863
#7 0x0003facc in api_handler (conn=0x719d62f8, ignored=<optimized out>) at /app/src/api/api.c:193
#8 0x00084690 in handle_request (conn=conn@entry=0x719d62f8) at /app/src/webserver/civetweb/civetweb.c:15413
#9 0x00088198 in handle_request_stat_log (conn=0x719d62f8) at /app/src/webserver/civetweb/civetweb.c:6831
#10 process_new_connection (conn=conn@entry=0x719d62f8) at /app/src/webserver/civetweb/civetweb.c:19977
#11 0x00089950 in worker_thread_run (conn=0x719d62f8) at /app/src/webserver/civetweb/civetweb.c:20349
#12 worker_thread (thread_func_param=0x719d62f8) at /app/src/webserver/civetweb/civetweb.c:20496
#13 0x00443bd4 in start (p=0x7167bd70) at src/thread/pthread_create.c:207
#14 0x0044eca0 in __clone () at src/thread/arm/clone.s:23
(repeat for 1300 lines)
That backtrace command is still running and outputting #${LINENO} 0x0044eca0 in __clone () at src/thread/arm/clone.s:23. I'm going to let it keep running and see if it actually completes.