-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Description
Pre-check
- I am sure that all the content I provide is in English.
Search before asking
- I had searched in the issues and found no similar feature requirement.
Apache Dubbo Component
Java SDK (apache/dubbo)
Descriptions
Environment
- Dubbo version:3.2.0
- Operating System version: CentOS
- Java version: 17
项目使用的Dubbo3.2.0 ,nacos使用的2.0.4,目前应用已经接入无损下线模式,可以确定的是重连之前下线的provider已经从注册中心下掉了。但最近应用发版时经常会遇到[DUBBO] Fail to connect toHeaderExchangeClient错误,详细报错信息如下:
className:org.apache.dubbo.remoting.transport.netty4.NettyClient
content:[DUBBO] Failed to connect to provider server by other reason., dubbo version: 3.2.0, current host: 172.17.0.2, 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.29.79.248:28004
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
at sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946) ~[?:?]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.100.Final.jar!/:4.1.100.Final]
className:org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask
content:[DUBBO] Fail to connect toHeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [/172.17.0.2:60946 -> /172.29.79.248:28004]], dubbo version: 3.2.0, current host: 172.17.0.2, error code: 6-16. This may be caused by , go to https://dubbo.apache.org/faq/6/16 to find instructions.
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://172.29.79.248:28004/com.xxx.SmartOrderFacade?anyhost=true&application=xxx&background=false&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dubbo.endpoints=[{"port":28004,"protocol":"dubbo"}]&dubbo.metadata-service.url-params={"prefer.serialization":"fastjson2,hessian2","version":"1.0.0","dubbo":"2.0.2","release":"3.2.0","side":"provider","port":"28004","protocol":"dubbo"}&dubbo.metadata.revision=0cb72cfbead0343b0571e40f6eba849a&dubbo.metadata.storage-type=local&dynamic=true&executor-management-mode=isolation&file-cache=true&generic=false&heartbeat=60000&interface=com.xxx.SmartOrderFacade&methods=querySmartOrderListByDate&pid=31&prefer.serialization=fastjson2,hessian2&qos.enable=true®ister-mode=instance®ister.ip=172.16.85.16&release=3.2.0&revision=1.0.0&service-name-mapping=true&side=consumer&sticky=false&timeout=3000×tamp=1764759449650&unloadClusterRelated=false&version=1.0.0) failed to connect to server /172.29.79.248:28004, error message is:Connection refused: /172.29.79.248:28004
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:226) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:173) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:219) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:273) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:183) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:53) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:94) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:653) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:732) ~[dubbo-3.2.0.jar!/:3.2.0]
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:454) ~[dubbo-3.2.0.jar!/:3.2.0]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /172.29.79.248:28004
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
at sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946) ~[?:?]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.100.Final.jar!/:4.1.100.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.100.Final.jar!/:4.1.100.Final]
... 1 more
收起
env:prod
eventLevel:ERROR
eventTime:2025-12-22 16:44:53.800
threadName:dubbo-client-heartbeat-reconnect-thread-1
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.100.Final.jar!/:4.1.100.Final]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
Related issues
No response
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status