songxiaosheng opened a new issue, #13400:
URL: https://github.com/apache/dubbo/issues/13400

   <!-- If you need to report a security issue please visit 
https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) 
of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.1.0
   * Operating System version: Linux、Macos
   * Java version: jdk8
   
   ### Steps to reproduce this issue
   
   1.  Launch Provider Application One 
   2. Launch Provider Application Two
   3. Launch Consumer Application One
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   After the provider is offline, consumers should not send heartbeat requests 
to this provider again
   
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   After the provider application is shut down, consumers will still send 
heartbeat requests to this offline process
   
   
   If there is an exception, please attach the exception trace:
   
   ```
   [21/11/23 15:25:22:255 CST] dubbo-client-idleCheck-thread-1  INFO 
header.ReconnectTimerTask:  [DUBBO] Initial connection to HeaderExchangeClient 
[channel=org.apache.dubbo.remoting.transport.netty4.NettyClient 
[/172.20.90.220:62262 -> /172.20.90.220:20881]], dubbo version: 3.1.0, current 
host: 172.20.90.220
   [21/11/23 15:25:22:255 CST] dubbo-client-idleCheck-thread-1  INFO 
netty4.NettyChannel:  [DUBBO] Close netty channel [id: 0xdba1d488, 
L:/172.20.90.220:62262 ! R:/172.20.90.220:20881], dubbo version: 3.1.0, current 
host: 172.20.90.220
   [21/11/23 15:25:22:260 CST] dubbo-client-idleCheck-thread-1 ERROR 
netty4.NettyClient:  [DUBBO] Failed to connect to provider server by other 
reason., dubbo version: 3.1.0, current host: 172.20.90.220, error code: 6-1. 
This may be caused by network disconnected, go to 
https://dubbo.apache.org/faq/6/1 to find instructions. 
   io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection 
refused: /172.20.90.220:20881
   Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)
        at 
io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        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:750)
   [21/11/23 15:25:22:262 CST] dubbo-client-idleCheck-thread-1 ERROR 
header.ReconnectTimerTask:  [DUBBO] Fail to connect to HeaderExchangeClient 
[channel=org.apache.dubbo.remoting.transport.netty4.NettyClient 
[/172.20.90.220:62262 -> /172.20.90.220:20881]], dubbo version: 3.1.0, current 
host: 172.20.90.220
   org.apache.dubbo.remoting.RemotingException: client(url: 
dubbo://172.20.90.220:20881/link.elastic.dubbo.entity.DemoService?anyhost=true&application=dubbo-demo-api-consumer&background=false&category=providers,configurators,routers&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&enable-empty-protection=false&file.cache=false&generic=false&heartbeat=60000&interface=link.elastic.dubbo.entity.DemoService&metadata-type=remote&methods=sayHello,sayHello1,sayHelloAsync,sayHello2&pid=61116&qos.enable=false&qos.port=-1&release=3.1.0&service-name-mapping=true&side=consumer&sticky=false)
 failed to connect to server /172.20.90.220:20881, error message is:Connection 
refused: /172.20.90.220:20881
        at 
org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:195)
        at 
org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:218)
        at 
org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:272)
        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: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:651)
        at 
org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:730)
        at 
org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:452)
        at java.lang.Thread.run(Thread.java:750)
   Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: 
Connection refused: /172.20.90.220:20881
   Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)
        at 
io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        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:750)
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to