Pi Randomly fails to resolve a domain, works after refresh

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

Expected Behaviour:

When visiting a website that is not blocked by the software, the hostname should be resolved correctly, and the website should load.

Actual Behaviour:

At random intervals, a DNS request will fail. A web browser will display its "could not connect" error, or my linux-based NAS will randomly send me email reports during scheduled backups with an error "Could not resolve hostname [www.mybackupserver.address]". After refreshing the browser (or the server automatically retrying the backup), the hostname is resolved correctly.

This will happen randomly; at least, I cannot see any pattern for these fails, which happen between one and three times in a day, usually in my desktop's browser (Windows 10, Firefox), trying to view a site.

The Pi-Hole software is running on a Pi Zero W, for the record.

Debug Token:

jav14w6ci2

What "backup" do you have configured? Is this on the client or router?

What does your pihole log (/var/log/pihole.log) show for these queries that fail? Is Pi-Hole receiving the queries, and if so, what is the reply from Pi-Hole?

What does your pihole log ( /var/log/pihole.log ) show for these queries that fail?

I have not been at the ready with the log when one comes up (yet,) so I am not sure what I would be looking for in the log file. So far, I have found lines that say reply [website.address.com] is NODATA-IPv6 , which returns a LOT of results, far more than I am expecting for this issue, so I do not know if those lines are relevant.

What “backup” do you have configured? Is this on the client or router?

My NAS runs Freenas, a FreeBSD based OS. I have set up automatic snapshots and replication (file transfer over SSH) to a remote device, and occasionally my NAS will fail to resolve the remote device's host name, which is when I get the emails I mentioned. I'm sorry, I forgot to change the word 'server' to 'NAS', I used that word, then re-wrote my post to be more specific, and apparently forgot to change that line.

I did a bit more research about my hardware, and the issue MAY lie in my wifi router. I have a Netgear R7000, and there are reports of the DNS service stopping for a few minutes at a time. My issue is not quite identical, as for me, individual requests fail, rather than losing all DNS services until the router reboots, but it could be a lead. The way the router is set up, it broadcasts itself as the only DNS server, then distributes the queries to the Pi, so it very well could be the router's fault.

I will change the DNS settings on my NAS to point directly to the Pi, instead of the default (router, via DHCP), and monitor for more emails. If I go a significant amount of time without issue, then I may have found the problem.

You are looking for a query for that domain name, followed by a reply. The log rotates each day, so you can search back to midnight your local time in the open log. In this example, the query led to a CNAME (essentially a DNS alias), and then to the IP for the site.

Feb 17 07:20:13 dnsmasq[7356]: query[A] discourse.pi-hole.net from 192.168.0.135
Feb 17 07:20:13 dnsmasq[7356]: forwarded discourse.pi-hole.net to 127.0.0.1
Feb 17 07:20:13 dnsmasq[7356]: reply discourse.pi-hole.net is <CNAME>;
Feb 17 07:20:13 dnsmasq[7356]: reply piholediscourse.b-cdn.net is 23.227.161.154

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