Problem after updating "lost connection to api"

Please follow the below template, it will help us to help you!

I had been running an oldish version of pihole and today I noticed that V4 was available. So I upgraded using pihole -up and everything seemed to go fine. However, later I noticed that my web interface no longer displays graphs.

I've tried the following:

  • I restarted ftl.
  • I cleared my browser's cache.
  • I upgraded the OS on my pi to the latest version.
  • I uninstalled pihole and reinstalled from the command line.
  • I've rebooted my pi in between lots of these changes.

I searched for similar problems but the don't seem to be exactly this, even though the text error message is identical.

The previous version I was running (about May 2018 time frame) worked with no problems.

Expected Behaviour:

on the web interface dashboard I expect to see graphs

Actual Behaviour:

I see spinning arrows instead of graphs and "lost connection to api" at the top of the page.

Debug Token:

kxtub8y8ka

Your debug log shows that "named" process is on port 53, which prevents pihole-FTL from using that port.

*** [ DIAGNOSING ]: Ports in use
*:53 named (IPv6)
127.0.0.1:53 named (IPv4)
127.0.0.1:953 named (IPv4)
[::1]:953 named (IPv6)
192.168.2.170:53 named (IPv4)
*:22 sshd (IPv4)
*:22 sshd (IPv6)
*:80 lighttpd (IPv4)
*:80 lighttpd (IPv6)

Typically "named" is BIND9. Find that process on your Pi - these commands may be helpful:

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'

sudo lsof -i :53

kill the process on port 53, then restart pihole-FTL with this command:

sudo service pihole-FTL restart

This should correct the other problem noted in your debug log - the random blocked domain should have returned 0.0.0.0 since you have NULL blocking enabled, but the actual address of the site is being returned.

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] fashionjewelryspot.net is 184.168.221.44 via localhost (127.0.0.1)
[✓] fashionjewelryspot.net is 184.168.221.44 via Pi-hole (192.168.2.170)
1 Like

Dont forget disabling named from getting started at boot:

sudo systemctl disable bind9

Or remove/uninstall the package:

sudo apt-get remove bind9

2 Likes

Excellent! Thanks so much, this fixed it. I've also disabled named.

One thing that I am curious about: why did pi-hole work before the upgrade, and then stop after the upgrade? I'm pretty sure that named has been running on port 53 all of this time.

Both can run alongside each other if not binding to conflicting sockets(IP+port#).
If want to know, you need to revert back to before the update and run the netstat command to figure out who was listening on what IP's and what ports:

sudo netstat -nltup | grep 'Proto\|pihole-FTL\|named\|dnsmasq'

EDIT: Below DNS version query run on a client PC (Linux, Windows or Mac) is a good test to see who is answering on a particular IP address:

nslookup -type=txt -class=chaos version.bind <PIHOLE_IP_ADDRESS>

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