apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.42k stars 26.41k forks source link

dubbo 服务提供者关闭后,消费端一直在重连 #12649

Closed chmsword closed 9 months ago

chmsword commented 1 year ago

Environment

dubbo 版本 3.1.2 配置动态 tagroute(grey 流量),关闭对应tag服务实例。 正常流量会链接到已关闭(110.19.246.138 grey实例 ,直接关机)实例 (org.apache.dubbo.remoting.transport.netty4.NettyClient:106^error)|traceUrl[-] - [DUBBO] Client-side timeout., dubbo version: 3.1.2, current host: 110.19.245.220, error code: 6-2. This may be caused by provider crash, go to https://dubbo.apache.org/faq/6/2 to find instructions. org.apache.dubbo.remoting.RemotingException: client(url: dubbo://110.19.246.138:20880/service?anyhost=true&application=wd&background=false&category=providers,configurators,routers&check=false&codec=dubbo&delay=20000&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&heartbeat=60000&interface=Service&ispuserver=true&loadbalance=random&methods=updateByActivity,getActivityProductByPfidListForTab,getActivityProductList,getActivityCombineProductIds,saveOrUpdate,updateProductStatus,getFullDiscountProductList,getFullDiscountProductListByPfid&path=Service&pid=25886&protocol=dubbo&qos.accept.foreign.ip=true&qos.enable=true&qos.port=22222&reference.filter=notice&release=3.1.2&service-name-mapping=true&service.filter=dubboExceptionFilter&side=consumer&sticky=false&threadpool=fixed&threads=500&timeout=10000&timestamp=1688127641244&unloadClusterRelated=false) failed to connect to server /110.19.246.138:20880 client-side timeout 3000ms (elapsed: 3000ms) from netty client 110.19.245.220 using dubbo version 3.1.2 at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:238) at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:171) at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:220) at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:274) at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:171) at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:52) at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87) at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:653) at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:732) at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:454) at java.lang.Thread.run(Thread.java:745) "

chmsword commented 1 year ago

nacos:2.1.2 enabled: true force: false key: model priority: 0 runtime: false tags:

songxiaosheng commented 1 year ago

未配置标签时候,消费者有调用的时候 你们提供者关闭时候 ,消费者是不是也会出现这个报错(未延迟销毁)

AlbumenJ commented 1 year ago

这个是个后台的重连线程,和业务流量没关系的呀 image

chmsword commented 1 year ago

这个是个后台的重连线程,和业务流量没关系的呀 image

这个为什么会一直重试,咨询下有什么好的方案防止这个问题

AlbumenJ commented 1 year ago

等待注册中心把机器给摘了就会停止了