开发者社区 > 云原生 > 正文

k8s环境不断重连已经关闭的pod

环境信息

Dubbo version: 3.0.2 Operating System version: Kubernetes Java version: 1.8

步骤重现

1.nacos是2.0.3, 并且服务提供者已经下线。

2.本地启动与jar启动没有出现此场景。

3.k8s环境服务重启以后出现一直重连旧的服务。

期待结果

请问怎么处理这种情况。

实际执行情况

2021-09-24 19:15:38[ dubbo-client-idleCheck-thread-1:3829053 ]-[ INFO ] [DUBBO] Initial connection to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [/10.3.4.13:56218 -> /10.3.4.7:20880]], dubbo version: 3.0.2.1, current host: 10.3.4.13 2021-09-24 19:15:38[ dubbo-client-idleCheck-thread-1:3829053 ]-[ INFO ] [DUBBO] Close netty channel [id: 0x7f5c5841, L:/10.3.4.13:56218 ! R:/10.3.4.7:20880], dubbo version: 3.0.2.1, current host: 10.3.4.13 2021-09-24 19:15:41[ dubbo-client-idleCheck-thread-1:3832054 ]-[ ERROR ] [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [/10.3.4.13:56218 -> /10.3.4.7:20880]], dubbo version: 3.0.2.1, current host: 10.3.4.13 org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.3.4.7:20880/com.opc.user.service.DynamicEsSearchService?anyhost=true&application=dz-opc-user&category=providers&codec=dubbo&delay=-1&deprecated=false&dispatcher=message&dubbo=2.0.2&dynamic=true&generic=false&heartbeat=60000&interface=com.opc.user.service.DynamicEsSearchService&logger=log4j2&metadata-type=remote&methods=getNewTopDynamics,getKnowledgeDynamics,getUserDynamic,getTopDynamicArticles,getHotOrLatestDynamics,getRecommendDynamics,getTodayMaxScoreDynamic,getLiveNewDynamic,getLiveDynamic,getNewRecommendDynamics,getUserDynamicLikes,getTopRecommendDynamics,getAppraisalDynamic,getTopDynamics,getUserFollowDynamic,getDynamicByUserTopic,getDynamicByTypeAndLabel,getDynamicNews,getAppraisalIndexDynamic,getDynamicByTopic,getUserVideoDynamics&path=com.opc.user.service.DynamicEsSearchService&pid=7&protocol=dubbo&release=3.0.2.1&service-name-mapping=true&side=provider&threadpool=cached&threads=200&timeout=30000&timestamp=1632477139767) failed to connect to server /10.3.4.7:20880 client-side timeout 3000ms (elapsed: 3001ms) from netty client 10.3.4.13 using dubbo version 3.0.2.1 at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:176) at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:197) at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:253) at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:166) at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49) at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87) at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648) at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727) at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449) at java.lang.Thread.run(Thread.java:748)

原提问者GitHub用户NoRedsquare

展开
收起
大圣东游 2023-05-11 19:59:04 178 0
1 条回答
写回答
取消 提交回答
  • 检查下 dubbo-registry-nacos 是不是和主版本一致的

    原回答者GitHub用户AlbumenJ

    2023-05-12 11:10:21
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关产品

  • 容器服务Kubernetes版
  • 相关电子书

    更多
    ACK 云原生弹性方案—云原生时代的加速器 立即下载
    ACK集群类型选择最佳实践 立即下载
    企业运维之云原生和Kubernetes 实战 立即下载

    相关镜像