Failed to resolve via localhost (127.0.0.1)

Expected Behaviour:

DNS running. It was working yesterday, and all of a sudden, DNS is not running.

Actual Behaviour:

Admin page says "Lost connection to API"
Status says "DNS service not running"
Keeps saying Failed to resolve via local host and via Pi-hole.

Debug Token:

https://tricorder.pi-hole.net/55wkx47q1m

Thank you very much guys!

pihole-FTL (piholes core DNS forwarder) isn't running

Try to restart it with

pihole restartdns

Have a look in the logs, if there are any crashes or errors

cat /var/log/pihole-FTL.log

Thank you very much for your time! I restarted the dns. Attaching the logs.

logs.txt (62.2 KB)

Thank you!

Is your DNS resolution working now?

I can't spot any errors or crashed, but pihole-FTL is restarting a lot of time in that log? Did you manually restart pihole/the device so often?


ADD:

What's the output of

sudo systemctl status --full --no-pager pihole-FTL.service

Thanks! I restarted the Beagle manually, yes. Attaching the rest:

● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Wed 2020-11-04 10:57:00 UTC; 24min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4372 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Nov 04 10:56:59 beaglebone systemd[1]: Starting LSB: pihole-FTL daemon...
Nov 04 10:56:59 beaglebone pihole-FTL[4372]: Not running
Nov 04 10:56:59 beaglebone su[4390]: (to pihole) root on none
Nov 04 10:56:59 beaglebone su[4390]: pam_unix(su:session): session opened for user pihole by (uid=0)
Nov 04 10:57:00 beaglebone pihole-FTL[4372]: dnsmasq: illegal repeated keyword at line 8 of /etc/dnsmasq.d/SoftAp0
Nov 04 10:57:00 beaglebone systemd[1]: Started LSB: pihole-FTL daemon.

Even though it appears red here, it's green.

Ok, I see it's this damn file:

cat /etc/dnsmasq.d/SoftAp0
interface=usb0
interface=usb1
port=53
dhcp-authoritative
domain-needed
bogus-priv
expand-hosts
dhcp-range=usb0,192.168.7.1,192.168.7.1,2m
dhcp-range=usb1,192.168.6.1,192.168.6.1,2m
listen-address=127.0.0.1
listen-address=192.168.7.2
listen-address=192.168.6.2
dhcp-option=usb0,3
dhcp-option=usb0,6
dhcp-option=usb1,3
dhcp-option=usb1,6
dhcp-leasefile=/var/run/dnsmasq.leases

Do you need that file? Are you using SoftAP?

If not, delete that file and restart pihole-FTL again.

Absolutely! Thank you very much. That did it. Nevertheless, when I reboot the Beagle, the file appears again, sabotaging it all. Do you how to stop rebuilding it on boot?

Thank you very much for your time

I've never used a pi as access point so I don't know what software you installed that created that file. Searching this forum for SoftAP yield a few issues whit exactly that file and a few approached to circumvent the re-recreation on reboot.

There might be more... just search for them.

Looks like that did the trick!
If the file SoftAp0 is interfering constantly with Pihole, delete it and tell the system not to generate it again.
Delete it:

sudo rm /etc/dnsmasq.d/SoftAp0

And don't generate it again just commenting this line:

wfile="/etc/dnsmasq.d/SoftAp0"

inside this file:

/opt/scripts/boot/am335x_evm.sh

Thank you very much for your help. I really appreciate you experts helping. Thank you very much!

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