Update from v5 to v5.2 but pihole status shows DNS service is NOT listening

A recent update from v5 to v5.2 and pihole is failing to start DNS service.

running pihole status shows
[✗] DNS service is NOT listening

I've tried multiple pihole -r to repair, but the same results on DNS service is not listening

Expected Behaviour:

Pihole start up after update or when executing sudo systemctl restart pihole-FTL

Actual Behaviour:

Restarting pihole-FTL service prompt permission error to write a file in /var/run/dnsmasq.leases. When I manually create the dnsmasq.lease file in /var/run and edit the permission, the startup script works. But everything resets after reboot and it'll fail to boot-up again.

beaglebone:/etc/dnsmasq.d$ sudo systemctl status pihole-FTL
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Sat 2021-02-13 06:33:45 UTC; 1s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 18053 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Feb 13 06:33:43 beaglebone systemd[1]: Starting LSB: pihole-FTL daemon...
Feb 13 06:33:43 beaglebone pihole-FTL[18053]: Not running
Feb 13 06:33:44 beaglebone su[18071]: (to pihole) root on none
Feb 13 06:33:44 beaglebone su[18071]: pam_unix(su:session): session opened for user pihole by (uid=0)
Feb 13 06:33:45 beaglebone pihole-FTL[18053]: dnsmasq: cannot open or create lease file /var/run/dnsmasq.leases: Permission denied
Feb 13 06:33:45 beaglebone systemd[1]: Started LSB: pihole-FTL daemon.

any ideas on how to fix this?

Debug Token:

debug token is: https://tricorder.pi-hole.net/6zw65p61h9

That is not a file Pi-hole would use by default.
Pi-hole's embedded pihole-FTL (its own tailored version of dnsmasq ) would use /etc/pihole/dhcp.leases , if you enabled its DHCP server.

The existence of that other file in that location would often indicate a separate dnsmasq instance running.

In your case however, since you seem to be using a Beaglebone, you likely suffer from a SoftAP configuration that is reactivated on system reboot unless you specifically disable that behaviour (see Failed to resolve via localhost (127.0.0.1) - #10 by amespuga)

Thanks for your reply, your solution fixed the DNS problem and it worked after commenting out the line wfile="/etc/dnsmasq.d/SoftAp0" in /opt/scripts/boot/am335x_evm.sh

Running pihole on beaglebone is such a pain because it always conflicts with some default background services. I ran into a bad gateway issue after the first restart. But running pihole -r seems to have resolved the problem.

Thanks again for your help :slight_smile:

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