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

**URL:** <https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953>\
**Category:** Community Help\
**Created:** [October 2, 2020, 7:45am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953 "2020-10-02T07:45:46Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 7:45am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/1 "2020-10-02T07:45:47Z")

</div>

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](https://tricorder.pi-hole.net/yhzvu9nb50)

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [October 2, 2020, 7:50am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/2 "2020-10-02T07:50:24Z")

</div>

Your IPv6 address assignment is off:

```auto
*** [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.

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 7:57am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/3 "2020-10-02T07:57:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [October 2, 2020, 8:03am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/4 "2020-10-02T08:03:54Z")

</div>

> [@doncarajo](#):
>
> My IPv6 prefix has not changed as it's permanent.

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

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 8:09am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/5 "2020-10-02T08:09:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [October 2, 2020, 8:18am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/6 "2020-10-02T08:18:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 8:20am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/7 "2020-10-02T08:20:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 8:22am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/8 "2020-10-02T08:22:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [October 2, 2020, 8:25am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/9 "2020-10-02T08:25:37Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 8:28am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/10 "2020-10-02T08:28:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 8:36am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/11 "2020-10-02T08:36:14Z")

</div>

> [@Bucking\_Horn](#):
>
> `grep -v '^#\|^` /etc/dhcpcd.conf`

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

```auto
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=

```

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [October 2, 2020, 8:56am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/12 "2020-10-02T08:56:31Z")

</div>

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

```auto
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._

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 9:43am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/13 "2020-10-02T09:43:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [October 2, 2020, 9:57am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/14 "2020-10-02T09:57:54Z")

</div>

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](https://discourse.pi-hole.net/t/cant-get-pihole-to-work-on-br0-interface/25995/30). Check the info on disabling IPv6 and try to apply/check that against your machine in reverse.

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 2, 2020, 10:10am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/15 "2020-10-02T10:10:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![doncarajo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@doncarajo](https://discourse.pi-hole.net/u/doncarajo)\
**Post date:** [October 3, 2020, 12:20am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/16 "2020-10-03T00:20:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [October 24, 2020, 12:20am UTC](https://discourse.pi-hole.net/t/pihole-stopped-working-all-of-a-sudden-lost-connection-to-api/38953/17 "2020-10-24T00:20:25Z")

</div>

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