DNS resolver failing to find valid DNS record
See original GitHub issueExpected behavior
The DNS resolver should find valid DNS records.
Actual behavior
Exception thrown:
Caused by: io.netty.resolver.dns.DnsNameResolverContext$SearchDomainUnknownHostException: Search domain query failed. Original hostname: 'host.toplevel' failed to resolve 'host.toplevel.search.domain' after 7 queries
at io.netty.resolver.dns.DnsNameResolverContext.finishResolve(DnsNameResolverContext.java:721)
at io.netty.resolver.dns.DnsNameResolverContext.tryToFinishResolve(DnsNameResolverContext.java:663)
at io.netty.resolver.dns.DnsNameResolverContext.query(DnsNameResolverContext.java:306)
at io.netty.resolver.dns.DnsNameResolverContext.query(DnsNameResolverContext.java:295)
at io.netty.resolver.dns.DnsNameResolverContext.tryToFinishResolve(DnsNameResolverContext.java:636)
at io.netty.resolver.dns.DnsNameResolverContext$3.operationComplete(DnsNameResolverContext.java:342)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:507)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:481)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:420)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
at io.netty.resolver.dns.DnsQueryContext.setSuccess(DnsQueryContext.java:197)
at io.netty.resolver.dns.DnsQueryContext.finish(DnsQueryContext.java:180)
at io.netty.resolver.dns.DnsNameResolver$DnsResponseHandler.channelRead(DnsNameResolver.java:969)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1412)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:943)
at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Steps to reproduce
- Configure a top level domain
someDomain
on a DNS server you own - Configure a host under the new top level domain
someHost.someDomain
- Configure multiple resolvers on the DNS client machine that will run the Netty code. i.e. 8.8.8.8, 192.168.1.1, and 10.0.0.1 (I have 3 resolvers configured, each pointing to different DNS masters - global DNS, local personal private network, company private network over a VPN)
- Configure the search domain to not match the top level domain, i.e.
search.otherDomain
on the DNS client machine that will run the Netty code - Ask netty to resolve
someHost.someDomain
- failure.
Minimal yet complete reproducer code (or URL to code)
I’m not using Netty directly so I’m not sure what to put here. Do you want my Redisson code?
Netty version
Breaks when I upgrade to Reddison 3.6+ which pulls in Netty 4.1.20+ When forcing downgrade to Netty 4.1.13 the problem still shows, but with a slightly different stack trace.
JVM version (e.g. java -version
)
java version “1.8.0_162” Java™ SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot™ 64-Bit Server VM (build 25.162-b12, mixed mode)
OS version (e.g. uname -a
)
Windows 10, Centos 7, Ubuntu 16.04
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:93 (47 by maintainers)
Top Results From Across the Web
How to Fix "DNS Server Not Responding" Error (11 Methods)
DNS Server Not Responding error means that your browser was unable to connect to the internet or the DNS of the domain you're...
Read more >Troubleshooting DNS Servers | Microsoft Learn
This article discusses how to troubleshoot issues on DNS servers. Check IP configuration. Run ipconfig /all at a command prompt, ...
Read more >Troubleshooting DNS Issues {nslookup, dig, host & More}
Misconfigured DNS server addresses are a common issue. Reset the settings and check if communication is back to normal.
Read more >Troubleshooting DNS Resolution Issues | pfSense ...
First check which DNS service is enabled on the firewall and how it is ... If the DNS Resolver is active but the...
Read more >Understand and troubleshoot partial DNS failure - Amazon AWS
In this case, during the DNS resolution, if registered name servers don't respond or respond with unexpected information, then the local ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@normanmaurer @johnjaylward
Bingo! Finally managed to reproduce the issue. Below is the test code:
MaraDNS (http://maradns.samiam.org/) running on 127.0.0.1:53 Here is the config for it https://github.com/netty/netty/files/1941275/maradns-config.zip
If server stands first in list of dns then all works fine:
Default DNS servers: [/127.0.0.1:53, /8.8.8.8:53, /87.98.175.85:53, /51.254.25.115:53] Log without errors: https://gist.github.com/mrniko/8ea3153888aa3dd8315b4549a77c34bb
But if it’s not, then lot of errors arise:
Default DNS servers: [/8.8.8.8:53, /127.0.0.1:53, /87.98.175.85:53, /51.254.25.115:53] Log with errors: https://gist.github.com/mrniko/59529c03450c69094d7b379515919ea2
Netty 4.1.30.Final JDK 11
Ok let me do a pr for the refresh in the meantime