[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
[i] Creating new gravity database
[i] Migrating content of /etc/pihole/adlists.list into new database
[✓] Deleting existing list cache
[✗] DNS service is not running
[✓] Restarting DNS server
[✗] DNS resolution is not available
My linux distribution is KDE Neon, which is based on Ubuntu 20.04. I had to disable the OS check.
After initial install, I basically lost internet connectivity (DNS not working), so I had to edit /etc/resolv.conf to restore it. Then I could run a pihole repair and access the admin UI, which showed that the "DNS service not running" and "FTL service is offline"
I also tried uninstalling and trying again, but I got the same behavior the 2nd time
I looked into the FTL service logs but didn't find any obvious error
I am installing pi-hole on a desktop computer with 16GB of RAM, I checked while restarting the pihole-FTL service and the RAM usage stays at 6.4GB, so I don't think there's a problem with system resources.
I noticed your last sentence is truncated, did you have other suggestions?
Each time I try to restart the pihole-FTL service, I get the same kind of log sequence in pihole-FTL.log:
[2022-05-15 23:08:28.011 415370M] INFO: FTL is running as user pihole (UID 997)
[2022-05-15 23:08:28.012 415370/T415371] Listening on port 4711 for incoming IPv4 telnet connections
[2022-05-15 23:08:28.012 415370/T415372] Listening on port 4711 for incoming IPv6 telnet connections
[2022-05-15 23:08:28.012 415370/T415373] Listening on Unix socket
[2022-05-15 23:08:28.012 415370M] Reloading DNS cache
[2022-05-15 23:08:28.018 415370M] Shutting down...
[2022-05-15 23:08:28.017 415370/T415374] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 0.4 msec
[2022-05-15 23:08:28.018 415370/T415374] Blocking status is enabled
[2022-05-15 23:08:28.268 415370M] Finished final database update (stored 0 queries)
[2022-05-15 23:08:28.268 415370M] Waiting for threads to join
and in the pihole.log file:
May 15 23:08:28 dnsmasq[415370]: started, version pi-hole-2.87test8 cachesize 10000
May 15 23:08:28 dnsmasq[415370]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
May 15 23:08:28 dnsmasq[415370]: using nameserver 192.168.1.1#53
May 15 23:08:28 dnsmasq[415370]: using only locally-known addresses for onion
May 15 23:08:28 dnsmasq[415370]: using only locally-known addresses for bind
May 15 23:08:28 dnsmasq[415370]: using only locally-known addresses for invalid
May 15 23:08:28 dnsmasq[415370]: using only locally-known addresses for localhost
May 15 23:08:28 dnsmasq[415370]: using only locally-known addresses for test
May 15 23:08:28 dnsmasq[415370]: read /etc/hosts - 5 addresses
May 15 23:08:28 dnsmasq[415370]: read /etc/pihole/custom.list - 0 addresses
May 15 23:08:28 dnsmasq[415370]: read /etc/pihole/local.list - 0 addresses
May 15 23:08:28 dnsmasq[415370]: exiting on receipt of SIGTERM
I can't find any reason for the shutdown in these files. However I dug in the syslog as you suggested and there are a few signs of errors/failures. Here is the complete syslog during the 10 seconds of an FTL restart: syslog-while-restarting-ftl.txt (27.5 KB)
And here are the lines that look suspicious to me:
May 15 23:08:28 clement-linux tracker-store[415378]: Cannot initialize database: Could not open sqlite3 database:'/home/pihole/.cache/tracker/meta.db': unable to open database file
May 15 23:08:28 clement-linux systemd[415336]: tracker-store.service: Main process exited, code=exited, status=1/FAILURE
May 15 23:08:28 clement-linux tracker-miner-f[415349]: Couldn't create new Files miner: 'Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying'
May 15 23:08:28 clement-linux pulseaudio[415347]: Failed to create secure directory (/home/pihole/.config/pulse): No such file or directory
I noticed that the service tries to access several files under /home/pihole but this directory doesn't exist. Although user pihole exists in /etc/passwd. Is this expected? Do you see something unusual in the system logs?
I tried disabling tracker, but that didn't have much effect on the syslogs.
So I removed the tracker, and then all tracker related errors disappeared from the syslog: syslog-while-restarting-ftl-tracker-uninstalled.txt (9.8 KB)
I think it got installed along with gnome-photos that I installed a while back, but I don't use it anyway.
However this didn't solve the problem, the FTL service still stops immediately after starting.
The syslog shows that the pihole user session stops just after FTL has started:
May 16 22:15:32 clement-linux systemd[1]: Started Session c3 of user pihole.
May 16 22:15:32 clement-linux pihole-FTL[7856]: FTL started!
May 16 22:15:32 clement-linux systemd[1]: Started LSB: pihole-FTL daemon.
May 16 22:15:32 clement-linux systemd[1]: Stopping Session c3 of user pihole.
After this line there are errors related to pulseaudio, but that's probably irrelevant.
And in pihole-FTL.log, still shutting down right after reloading the DNS cache: