You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/09 08:49:21 UTC

[GitHub] [dubbo] YsoulM opened a new issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

YsoulM opened a new issue #8748:
URL: https://github.com/apache/dubbo/issues/8748


   - [] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   - [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.0.1
   * Operating System version: centos 7.5
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   已经在搜索了issues,有人碰到类似的问题 #6404
   由于线上已经使用,需要解决一下线上问题,我这边暂时提交了一个pull request。
   https://github.com/apache/dubbo/pull/8746
   能不能帮忙确认下,这样修改是否会有别的问题,谢谢。
   
   ### Expected Result
   Provider停机后,Consumer中ReconnectTimerTask不再Reconnect
   
   ### Actual Result
   Provider停机后,Consumer中ReconnectTimerTask一直对已经销毁的Provider进行Reconnect
   
   If there is an exception, please attach the exception trace:
   
   ```
   [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [/10.55.130.172:43584 -> /10.55.136.88:20880]], dubbo version: 3.0.1, current host: 10.55.130.172
   org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.55.136.88:20880/cn.com.***.geo.api.remoteservice.RemoteIpAreaService?anyhost=true&application=geo-server&check=false&cluster=failfast&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&heartbeat=60000&interface=cn.com.***.geo.api.remoteservice.RemoteIpAreaService&isPerfTestSupportted=true&metadata-type=remote&methods=findAllIpInfoByIpIn,findIpInfo,findIpGeoInfo&release=3.0.1&retries=0&serverApplicationName=geo-server&side=provider&threadpool=cached&threads=500&timeout=3000&warmup=300000) failed to connect to server /10.55.136.88:20880, error message is:No route to host: /10.55.136.88:20880
     at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:170)
     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)
   Caused by: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: /10.55.136.88:20880
   Caused by: java.net.NoRouteToHostException: No route to host
     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
     at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
     at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
     at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
     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)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw commented on issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

Posted by GitBox <gi...@apache.org>.
zrlw commented on issue #8748:
URL: https://github.com/apache/dubbo/issues/8748#issuecomment-916588446


   看一下PR #8755 或 #8756 ,应该能彻底解决你的问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] YsoulM closed issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

Posted by GitBox <gi...@apache.org>.
YsoulM closed issue #8748:
URL: https://github.com/apache/dubbo/issues/8748


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw commented on issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

Posted by GitBox <gi...@apache.org>.
zrlw commented on issue #8748:
URL: https://github.com/apache/dubbo/issues/8748#issuecomment-916167734


   #8752
   你这个修复有问题吧,如果reference引用个数多于2个怎么办


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] YsoulM commented on issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

Posted by GitBox <gi...@apache.org>.
YsoulM commented on issue #8748:
URL: https://github.com/apache/dubbo/issues/8748#issuecomment-916591016


   > 看一下PR #8755 或 #8756 ,应该能彻底解决你的问题。
   
   感谢大佬!!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] YsoulM commented on issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

Posted by GitBox <gi...@apache.org>.
YsoulM commented on issue #8748:
URL: https://github.com/apache/dubbo/issues/8748#issuecomment-916578086


   @zrlw 我这边调试了下,provider在优雅下线后,consumer针对这个provider的ReferenceCountExchangeClient实例会对其所有接口分别referenceCount减1。但是consumer针对这个provider的MetadataService没有进行销毁,或者销毁的时候没有触发referenceCount减1,导致这个referenceCount永远大于1,不能触发ExchangeClient的close方法。
   然后每次ReconnectTimerTask都会扫描到,导致报错。
   
   修改为<1,是忽略掉了MetadataService的销毁流程,测试环境测试,已经不报错了。
   
   还有一种方案,MetadataService也触发销毁,或者在原有的销毁中也触发referenceCount减1。 但是这个方案估计比较复杂,时间有点来不急。。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] YsoulM removed a comment on issue #8748: Consumer一直重连(Reconnect)已经下线的(destroyed)provider

Posted by GitBox <gi...@apache.org>.
YsoulM removed a comment on issue #8748:
URL: https://github.com/apache/dubbo/issues/8748#issuecomment-916591016


   > 看一下PR #8755 或 #8756 ,应该能彻底解决你的问题。
   
   感谢大佬!!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org