Pihole "DNS Service Not running" and "FTL offline"
Problem with Beta 5.0:
Pihole "DNS Service Not running" and "FTL offline" no Internet connectivity
I upgraded my Pihole from 4 > 5 following the official guide.
Before this the Pihole was working.
During install I had multiple errors, I had to change back to my router as DNS and DHCP, edited /etc/resolve.conf to restore Internet access to the Pihole device (Debian PC)
I ran through the installation again and it installs but with some errors:
/usr/local/bin/pihole: line 118: service: command not found
When I run pihole -r and repair it completes successfully
I found that dnsmasq service wasn't installed, not sure why this was removed when installation of v5 failed.
After installing this the DNS service is running but FTL engine still appears offline.
When I run pihole -r it completes but there is an error:
[β] /usr/local/bin/pihole: line 118: service: command not found
I found that dnsmasq and FTL engine are both trying to use port 53 but the latter cannot start because the port is already in use, I killed the dnsmasq service then started FTL and the errors have disappeared in the web interface.
After waiting then refreshing the web interface both errors have appeared again, likely because dnsmasq wasn't restarted.
[53] is in use by dnsmasq (https://discourse.pi-hole.net/t/hardware-software-requirements/273#ports)
[53] is in use by dnsmasq (https://discourse.pi-hole.net/t/hardware-software-requirements/273#ports)
Let's confirm and then you will need to not only stop dnsmasq, but also kill it and likely remove it. Pi-hole has dnsmasq embedded in pihole-FTL, and a separate dnsmasq on the host is not required and causes problems as you have discovered.
I did some further testing and found that FTL will start and then crash after some time
root@SVR:/home/user# sudo /etc/init.d/pihole-FTL start
Not running
FTL started!
root@SVR:/home/user# sudo /etc/init.d/pihole-FTL status
[ ok ] pihole-FTL is running
root@SVR:/home/user# sudo /etc/init.d/pihole-FTL status
[ ok ] pihole-FTL is running
root@SVR:/home/user# sudo /etc/init.d/pihole-FTL status
[ ] pihole-FTL is not running
I updated Pihole with pihole -up and the core updated.
After restarting the issue is similar, DNS and FTL are offline, when I start FTL manually (sudo /etc/init.d/pihole-FTL start) it shows as active for a while but crashes again with a different error:
Apr 30 11:17:53 dnsmasq[560]: read /etc/pihole/gravity.list - 1 addresses
Apr 30 11:17:53 dnsmasq[560]: query[SOA] local from 127.0.0.1
Apr 30 11:33:34 dnsmasq[2148]: started, version pi-hole-2.81 cachesize 10000
Apr 30 11:33:34 dnsmasq[2148]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify dumpfile
Apr 30 11:33:34 dnsmasq[2148]: using only locally-known addresses for domain use-application-dns.net
Apr 30 11:33:34 dnsmasq[2148]: using nameserver 208.67.220.220#53
Apr 30 11:33:34 dnsmasq[2148]: using nameserver 208.67.222.222#53
Apr 30 11:33:34 dnsmasq[2148]: read /etc/hosts - 5 addresses
Apr 30 11:33:34 dnsmasq[2148]: read /etc/pihole/local.list - 2 addresses
Apr 30 11:33:34 dnsmasq[2148]: failed to load names from /etc/pihole/black.list: No such file or directory
Apr 30 11:33:34 dnsmasq[2148]: bad address at /etc/pihole/gravity.list line 2
I decided to uninstall PiHole because I've been unable to fix or address the issue.
Both aren't fatal errors. This was not the reason for the crash you've seen.
This is too unfortunate as it makes us unable to trace down the bug. Note that you've tried a beta version of the code and we explicitly said
Please do not run this if you are not comfortable with digging into any issues that may arise. That said, we would like to have some support in making sure we have every imaginable configuration covered before release. Pi-hole can already do so much, it is almost impossible to test all features ourselves properly.
And, again, please use the βBeta 5.0β Category on our Discourse Forum to discuss the beta/report any findings. Weβll be there to give help and update the beta quickly in case you find any errors.
However, with "quick", we obviously cannot mean within a few hours as we're all only volunteers.
As one last thing, do you still have the log? What were the lines above
?
You said
what was this error precisely and was it happening immediately above the crash report?
I still have the log, I will try and recover it from the machine soon.
I had some other issues with the machine when uninstalling Pihole, as I ran apt-get autoremove I lost most functionality when this removed core packages, I'm looking to reimage it once I've got the log.
From memory the log basically said that Gravity.db doesn't exist / can't be opened and yes this did happen just before the above log posted.
There were around 82k lines where it was trying to read from the list and stating the entry was invalid for each line.
I had this - everything worked but FTL and DNS service would randomly stop after a period of time.
I fixed it by running a command to checkout the latest v5 FTL (I forget the exact command - its in another topic somewhere) and since then FTL and DNS have been rock solid
Unfortunately I wasn't able to recover the log file.
After the uninstall and turning off the PC it wouldn't turn on, I've spent most the weekend diagnosing it and found the PSU was faulty. I replaced it but when I started Debian I couldn't startx and it would've been a lot of extra work to recover the log file.
I've since installed Ubuntu server and installed pihole V5 Beta following the same procedure but on a clean install and it's working fine so far, I think the issue was likely caused by some old settings conflicting when upgrading.
Thanks for the software and also the help, I appreciate it