java.net.UnknownHostException: failed to resolve ‘xxx.com‘ after 3 queries
at io.netty.resolver.dns.DnsNameResolverContext.finishResolve(DnsNameResolverContext.java:699)
at io.netty.resolver.dns.DnsNameResolverContext.tryToFinishResolve(DnsNameResolverContext.java:641)
at io.netty.resolver.dns.DnsNameResolverContext.query(DnsNameResolverContext.java:290)
at io.netty.resolver.dns.DnsNameResolverContext.query(DnsNameResolverContext.java:280)
at io.netty.resolver.dns.DnsNameResolverContext.access$600(DnsNameResolverContext.java:60)
at io.netty.resolver.dns.DnsNameResolverContext$3.operationComplete(DnsNameResolverContext.java:322)
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.tryFailure(DefaultPromise.java:122)
at io.netty.resolver.dns.DnsQueryContext.setFailure(DnsQueryContext.java:222)
at io.netty.resolver.dns.DnsQueryContext.access$300(DnsQueryContext.java:42)
at io.netty.resolver.dns.DnsQueryContext$4.run(DnsQueryContext.java:162)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
查看 windows 设置的dns服务器 用自动获取可能会拿到局域网的ip 如:192.168.0.1 出了问题 手动设置就可以了 如:8.8.8.8
查看 linux设置的dns服务器
看看自己转载的这篇文章 http://www.cnblogs.com/LiuPan2016/p/8830244.html
原文地址:https://www.cnblogs.com/LiuPan2016/p/8830277.html