TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.47k stars 431 forks source link

Strange errors #275

Closed Globulopolis closed 3 years ago

Globulopolis commented 3 years ago

After several weeks of normal operation, constant errors appeared.

[2021-07-10 00:12:45 Local] DNS Server recursive resolution failed for QNAME: www.google.com; QTYPE: A; QCLASS: IN; Forwarders: cloudflare-dns.com:853 (1.1.1.1:853), cloudflare-dns.com:853 (1.0.0.1:853), dns10.quad9.net:853 (9.9.9.10:853);
TechnitiumLibrary.Net.Dns.DnsClientException: DnsClient failed to resolve the request: no response from name servers.
   at TechnitiumLibrary.Net.Dns.DnsClient.InternalResolveAsync(DnsDatagram request, Boolean qnameMinimization) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 1893
   at DnsServerCore.Dns.DnsServer.RecursiveResolveAsync(DnsDatagram request, IReadOnlyList`1 viaForwarders, Boolean cachePrefetchOperation, Boolean cacheRefreshOperation, TaskCompletionSource`1 taskCompletionSource) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\DnsServer.cs:line 1980

Why this can happen? Nothing changed on server and network.

Just restarted technitium service and resolution back to normal.

ShreyasZare commented 3 years ago

Thanks for the feedback. I am not exactly sure of the reason. It could be anything like a temporary network issue or something else. Need to see if this repeats and find pattern.

ShreyasZare commented 3 years ago

closing issue. let me know if the issue is not going away.

Globulopolis commented 3 years ago

It's happened again yesterday.

[2021-08-26 23:59:34 Local] DNS Server recursive resolution failed for QNAME: github.com.lookup.dkimwl.org; QTYPE: A; QCLASS: IN; Forwarders: cloudflare-dns.com:853 (1.1.1.1:853), cloudflare-dns.com:853 (1.0.0.1:853), dns10.quad9.net:853 (9.9.9.10:853);
TechnitiumLibrary.Net.Dns.DnsClientException: DnsClient failed to resolve the request: request timed out.
   at TechnitiumLibrary.Net.Dns.DnsClient.InternalResolveAsync(DnsDatagram request, Boolean qnameMinimization, IDnsCache nsResolveCache) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 1958
   at DnsServerCore.Dns.DnsServer.RecursiveResolveAsync(DnsDatagram request, IReadOnlyList`1 viaForwarders, Boolean cachePrefetchOperation, Boolean cacheRefreshOperation, TaskCompletionSource`1 taskCompletionSource) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\DnsServer.cs:line 2052
[2021-08-26 23:59:34 Local] DNS Server recursive resolution failed for QNAME: googlemail.l.google.com; QTYPE: A; QCLASS: IN; Forwarders: cloudflare-dns.com:853 (1.1.1.1:853), cloudflare-dns.com:853 (1.0.0.1:853), dns10.quad9.net:853 (9.9.9.10:853);
TechnitiumLibrary.Net.Dns.DnsClientException: DnsClient failed to resolve the request: request timed out.
   at TechnitiumLibrary.Net.Dns.DnsClient.InternalResolveAsync(DnsDatagram request, Boolean qnameMinimization, IDnsCache nsResolveCache) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 1958
   at DnsServerCore.Dns.DnsServer.RecursiveResolveAsync(DnsDatagram request, IReadOnlyList`1 viaForwarders, Boolean cachePrefetchOperation, Boolean cacheRefreshOperation, TaskCompletionSource`1 taskCompletionSource) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\DnsServer.cs:line 2052
ShreyasZare commented 3 years ago

Thanks for the post. These are just request time out errors which may come sometimes. The DNS server will keep retrying in background to try to resolve it so this should not be noticeable to end user for most cases.

If you have Serve Stale feature enabled then such issues will get masked and the old expired entries in the cache will get used to serve queries while the DNS server keeps retrying in the background.

Globulopolis commented 3 years ago

But DNS server cannot resolve any more. I need to restart the service and only after that server can resolve.

ShreyasZare commented 3 years ago

But DNS server cannot resolve any more. I need to restart the service and only after that server can resolve.

I will try to reproduce this issue on my setup.

If possible it would be much better if you can do a pcap capture when the issue starts. You will need to start the packet capture and then use the DNS Client tab to make a query that does not exists in the cache (like some-random-name.google.com will do). Since the protocol is encrypted, nothing will be visible but at least it will make it clear if there is an attempt to connect to these servers and send queries.

Also when this issue comes, instead of restarting the DNS service try to change the forwarders to use another protocol like DoH or plain UDP and see if that makes a difference and if the DNS server starts resolving.