Pihole stopped working all of a sudden "Lost connection to API"

All of a sudden, PiHole stopped working and says that it "lost connection to API". The backup microSD card gave the same problem. Turning off the pihole DHCP server seems to allow FTL to work but only for localhost as it doesn't answer queries from any other LAN clients. I have had to revert to using the router as the DHCP server and have had to bypass PiHole as DNS as PiHole is not responding to anything but localhost (as I said).

Debug token:

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

Your IPv6 address assignment is off:

*** [ DIAGNOSING ]: Networking
[✗] No IPv6 address(es) found on the eth0 interface.

*** [ DIAGNOSING ]: Name resolution (IPv6) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve emaildgqw.com via localhost (::1)
[✗] Failed to resolve emaildgqw.com via Pi-hole (2403:5800:7101:f00:efa0:15e8:5e6d:75c3)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (2001:4860:4860::8888)

If I remember some of your previous posts correctly, you set up a static IPv6 address in your Pi-hole's dhcpcd.conf.
So if your ISP would have changed your IPv6 prefix, that wouldn't propagate to your Pi-hole.

Verify your static IP assignment still matches your current IPv6 prefix as distributed by your router.

My IPv6 prefix has not changed as it's permanent. I can now get LAN clients to access the PiHole for DNS, I had changed the interface listening behaviour in an effort to get this to work. But it does seem that IPv6 is down in my network. I'll reboot the router and see.

In that case, verify that your dhcpcd.conf still holds the correct IPv6 definitions.

dhcpcd.conf is ok, however, running ifconfig does not show an IPv6 address for the eth0 interface. Would you know why that is? All my other LAN devices are getting IPv6 addresses.

I trust you already checked the usual suspects, any new software on the Pi-hole, new firewall rules (blocking ICMPv6 perhaps?), or rebooting your Pi-hole?

No new software. No new firewall rules. I have rebooted the PiHole a few times; I'll try again.

Yeah, rebooting doesn't seem to give the Rpi its IPv6 address back. I wonder what happened? Could it be anything to do with the pihole -r command that I used?

When did you run that?
If you chose Reconfigure, that may have written to dhcpcd.conf as well, depending on your choices.

But you surely would have spotted that when checking dhcpcd.conf.
Let's check that nonetheless:

grep -v '^#\|^$' /etc/dhcpcd.conf

No, I just chose repair. It used to get an IPv6 interface on its own; is there a setting somewhere that decides this?

This is what I got from that (I removed the IPv6 details):

hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private
interface eth0
static ip_address=192.168.0.222/24
static ip6_address=2403:5800:xxxxxxxx/64
static routers=192.168.0.1
static domain_name_servers=127.0.0.1
static domain_search=

Try if manually adding an IPv6 address would work for you:

ip address add 2403:5800:xxxxxxxx/64 dev eth0

EDIT: I'm not certain your final domain_search= line is a valid option, it doesn't show up in the man pages for dhcpcd.conf. Try commenting it out and restart.

I'll be offline in a minute, so may not be able to stay involved.

The issue seems to be that the Rpi4 is no longer getting IPv6 connectivity but everything else in my LAN does. Does anyone know how to re-enable IPv6 working on the Rpi4?

Am running out of time for catching my train, so just a quick referal to Can't get pihole to work on br0 interface - #30 by Bucking_Horn. Check the info on disabling IPv6 and try to apply/check that against your machine in reverse.

Hi. It didn't work. This is driving me crazy!

Well, ended up re-installing everything from scratch and it works again. I don't understand.

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