【Azure Redis 缓存】Redisson 连接 Azure Redis出现间歇性 java.net.UnknownHostException 异常

网友投稿 413 2022-10-05

【Azure Redis 缓存】Redisson 连接 Azure Redis出现间歇性 java.net.UnknownHostException 异常

问题描述

在Java项目中,使用Redisson作为连接Redis的客户端,间歇性的出现了DNS Monitor throwable 错误。

DNSMonitor throwable="java.net.UnknownHostException: failed to resolve 'xxxxxx.redis.cache.chinacloudapi.cn'

Redisson版本为:

org.redisson:redisson:3.12.0

全部的异常信息为:

level=ERROR logger=org.redisson.connection.DNSMonitor throwable="java.net.UnknownHostException: failed to resolve 'xxxxxx.redis.cache.chinacloudapi.cn' after 2 queries at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:901) at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:860) at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:328) at io.netty.resolver.dns.DnsResolveContext.access$600(DnsResolveContext.java:63) at io.netty.resolver.dns.DnsResolveContext$2.operationComplete(DnsResolveContext.java:377) at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:502) at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:495) at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:474) at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:415) at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:540) at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:533) at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:114) at io.netty.resolver.dns.DnsQueryContext.setFailure(DnsQueryContext.java:220) at io.netty.resolver.dns.DnsQueryContext.access$300(DnsQueryContext.java:43) at io.netty.resolver.dns.DnsQueryContext$4.run(DnsQueryContext.java:170) at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:127) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:405) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)Caused by: io.netty.resolver.dns.DnsNameResolverTimeoutException: [/8.8.4.4:53] query timed out after 5000 milliseconds (no stack trace available)" thread=redisson-netty-4-21 message="Unable to resolve xxxxxx.redis.cache.chinacloudapi.cn" fluentd=517d053c90c2 tag=logback.aliClient.10.218.192.150

问题分析

根据错误提示,在Github上找到 Redisson 和 Netty 都存在相似的问题。最后都建议升级 Redisson 版本到最新,同时也把 Netty 的版本升级到最新。

Regression: DNS resolver failing to find valid DNS record :​​​resolver failing to find valid DNS record : ​​​DNS resolver failing to find valid DNS record : ​​resolver failing to find valid DNS record : ​​云中,恰是如此!

分类: ​​【Azure Redis 缓存】​​

标签: ​​Azure Redis​​, ​​DNSMonitor throwableDNSMonitor throwable​​, ​​java.net.UnknownHostException​​, ​​dnsMonitoringInterval​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:什么是Office 365?
下一篇:Java与C++分别用递归实现汉诺塔详解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~