DNS service not starting automatically

Expected Behaviour:

Raspberry Pi 4 with Raspberry Pi OS
Also using local DNS proxy cloudflared

Actual Behaviour:

Pi-hole doesn’t start DNS service automatically when restarting, have to restart DNS service manually to make it work.

Debug Token:

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

Found this previous post:
https://discourse.pi-hole.net/t/dns-resolver-not-starting-on-restart/
But it didn’t help.

No, Pi-hole starts up on system boot. A following restart wouldn't make much sense.
Maybe it's an issue with the order of your network interfaces coming up.
What does /var/log/pihole.log and /var/log/pihole-FTL.log show?

There is the DELAY_STARTUP option for FTL to, well, do exactly what it says. It may be a solution for you. A debug token would still be very helpful so we can check if your interface is configured in a strange way or something similar.

No, because you would loose your entire DNS cache at this point.

Thanks for the reply, updated debug token.

I can't spot any obvious errors in your debug log.


Did you manually restart Pi-hole twice within a minute?

   Mar  6 07:32:50 dnsmasq[971]: exiting on receipt of SIGTERM
   Mar  6 07:32:50 dnsmasq[22331]: started, version pi-hole-2.84 cachesize 10000
   Mar  6 07:32:50 dnsmasq[22331]: DNS service limited to local subnets
   Mar  6 07:32:50 dnsmasq[22331]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile
   Mar  6 07:32:50 dnsmasq[22331]: DNSSEC validation enabled
   Mar  6 07:32:50 dnsmasq[22331]: configured with trust anchor for <root> keytag 20326
   Mar  6 07:32:50 dnsmasq[22331]: using only locally-known addresses for domain use-application-dns.net
   Mar  6 07:32:50 dnsmasq[22331]: using nameserver ::1#5053
   Mar  6 07:32:50 dnsmasq[22331]: using nameserver 127.0.0.1#5053
   Mar  6 07:32:50 dnsmasq[22331]: read /etc/hosts - 5 addresses
   Mar  6 07:32:50 dnsmasq[22331]: read /etc/pihole/custom.list - 0 addresses
   Mar  6 07:32:50 dnsmasq[22331]: read /etc/pihole/local.list - 2 addresses
   Mar  6 07:33:11 dnsmasq[22331]: exiting on receipt of SIGTERM
   Mar  6 07:33:11 dnsmasq[22461]: started, version pi-hole-2.84 cachesize 10000

Side note:
Your router distributes it's own and another IP as DNS server via DHCP. But it's not Pi-holes IP. Is this on purpose?

      dns-server: 192.168.2.1
      dns-server: 207.164.234.193

I restarted pi-hole again but not twice within a minute this time, and I have updated the debug token.

My router's DNS resolver is not pihole because I just use pihole for myself mostly.

Your Pi-hole has not received a single query, are you sure you use Pi-hole at all?

   [2021-03-07 13:34:01.703 695M] Imported 0 queries from the long-term database
   [2021-03-07 13:34:01.703 695M]  -> Total DNS queries: 0
   [2021-03-07 13:34:01.703 695M]  -> Cached DNS queries: 0
   [2021-03-07 13:34:01.703 695M]  -> Forwarded DNS queries: 0
   [2021-03-07 13:34:01.704 695M]  -> Blocked DNS queries: 0
   [2021-03-07 13:34:01.704 695M]  -> Unknown DNS queries: 0
   [2021-03-07 13:34:01.704 695M]  -> Unique domains: 0
   [2021-03-07 13:34:01.704 695M]  -> Unique clients: 0
   [2021-03-07 13:34:01.704 695M]  -> Known forward destinations: 0

Please run

nslookup pi.hole

nslookup pi.hole 192.168.2.56

from the device that you think is using Pi-hole


Are you blocking port 53 in your network?

*** [ DIAGNOSING ]: Operating system
[i] dig return code:  10
[i] dig response:  dig: couldn't get address for 'ns1.pi-hole.net': failure

I am using pihole on my phone, so I can't run nslookup. However, this time I restarted pihole and using my phone trying to make a few DNS request, then run pihole -d and updated the debug token.

The interesting thing is, under pihole DNS settings, if I set "Listen on all interfaces" then the problem occurs, but if I set "Listen only on interface eth0" then there won't be any problem at all...

Please run echo ">stats >quit" | nc localhost 4711 on your Pi-hole.

Did you try

I just responded to this German discussion:

Maybe it is related. Note that there isn't a solution yet over there. They describe as well that Pi-hole starts but doesn't reply to queries until it is restarted manually.

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