So, this has been going on for a while now: I have a Ubuntu server that I use for VPN server when travelling. I run pihole on that server, and a few websites (using apache, lighttpd isn't active).
Every now and then (sometimes every few minutes, sometimes every few hours) dns resolution just stops working:
Expected Behaviour:
I should be able to resolve DNS.
The Web interface should say "Active" and load data.
Actual Behaviour:
DNS resolution doesn't work.
Web interface says "DNS service not running" " FTL offline" "Lost connection to API"
When I do systemctl status pihole-FTL I get this output, showing FTL is definitely running:
$ sudo systemctl status pihole-FTL
β pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; bad; vendor preset: enabled)
Active: active (exited) since Wed 2018-09-26 11:53:01 BST; 9min ago
Docs: man:systemd-sysv-generator(8)
Process: 21304 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
Process: 21312 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
Sep 26 11:53:01 do1 systemd[1]: Stopped LSB: pihole-FTL daemon.
Sep 26 11:53:01 do1 systemd[1]: Starting LSB: pihole-FTL daemon...
Sep 26 11:53:01 do1 pihole-FTL[21312]: Not running
Sep 26 11:53:01 do1 pihole-FTL[21312]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Sep 26 11:53:01 do1 su[21338]: Successful su for pihole by root
Sep 26 11:53:01 do1 su[21338]: + ??? root:pihole
Sep 26 11:53:01 do1 su[21338]: pam_unix(su:session): session opened for user pihole by (uid=0)
Sep 26 11:53:01 do1 pihole-FTL[21312]: FTL started!
Sep 26 11:53:01 do1 systemd[1]: Started LSB: pihole-FTL daemon.
Simply doing systemctl restart pihole-FTL fixes the issue - until it recurs a few min/hours later...
Debug Token:
Can't get one, because I cannot upload the log due to broken DNS resolution. Happy to upload and/or send the log somewhere confidential.
I have this issue too, running on a RPi 3. Have never been able to get to it when its happening but can confirm that the console is completely unavailable. Leave it for a short period of time (minutet(s)) and it returns. All internet based activity fails during an incident - YouTube, web browsing, streaming etc. Raspian and PiHole are fully up to date.
Bit new to debugging - whats required to assist troubleshooting please ?
*** [ DIAGNOSING ]: Networking
[β] IPv4 address(es) bound to the eth0 interface:
*:80/18 matches the IP found in /etc/pihole/setupVars.conf
*:5/16 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)
[β] IPv6 address(es) bound to the eth0 interface:
*:4001 matches the IP found in /etc/pihole/setupVars.conf
*:9d64 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)
^ Please note that you may have more than one IP address listed.
As long as one of them is green, and it matches what is in /etc/pihole/setupVars.conf, there is no need for concern.
The link to the FAQ is for an issue that sometimes occurs when the IPv6 address changes, which is why we check for it.
[i] Default Pv4 gateway: *:.1
* Pinging *:.1...
[β] Gateway responded.
[i] Default IPv6 gateway: *::1
* Pinging *::1...
[β] Gateway responded.
Something is wonky with your settings ...
That still does not explain why the (at least) local resolution does not work.
This actually worked ...
Do you have an instance of Pi-hole on the raspberry pi ?
Sorry, been mostly offline over the weekend. Interestingly, pihole has stayed up all weekend, which was somewhat unexpected, and means I can't really test the the queries. Will report back, the next time it turns up.
Out of curiosity:
I'm quite frankly not entirely sure what that means. I'm vaguely familiar with what a subnet is, but what makes /18 special? Is it just the size of it? I did get it assigned from my provider: It's a DigitalOcean droplet, and I didn't really touch the interface config.
So, I thought I should provide some update on this.
TL;DR: It appears the machine was running out of memory. Increasing memory solved it.
I noticed about a week ago, that I was still running on one of DigitalOcean's legacy plans with 512 MB of RAM, so upgraded to 1 GB. Pihole has been stable since.
I should note that I did switch to using dnsmasq rather than pihole-FTL for DNS resolution in the mean time, and dnsmasq was running stably on 512 MB of memory (as I'd expect it to do, given it really isn't doing much.)
@RamSet / @jfb According to Hardware/Software Requirements 512 MB should've been sufficient. Just as a data point, that for me it didn't run stably at all on 512 MB memory since upgrading to 4.0.