if NettyRemotingClient.invokeSync timeout, the following error will be thrown.
Caused by: org.apache.rocketmq.remoting.exception.RemotingTimeoutException: invokeSync call the addr[null] timeout
at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:563) ~[rocketmq-remoting-5.1.0.jar:5.1.0]
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1787) ~[rocketmq-client-5.1.0.jar:5.1.0]
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1778) ~[rocketmq-client-5.1.0.jar:5.1.0]
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:609) ~[rocketmq-client-5.1.0.jar:5.1.0]
BUG REPORT
if NettyRemotingClient.invokeSync timeout, the following error will be thrown.
the error message said that
addr
is null, but it's not. there are some caller for example https://github.com/apache/rocketmq/blob/086f9d130ba7682533de7f449eabd4170071fa89/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java#L1785 call invokeSync method with nulladdr
argument. but the following line would get real address ifaddr
is null. https://github.com/apache/rocketmq/blob/2f93cbe051eb82834ee1ecba981c820a966190f3/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java#L554suggest changing error message to use
channel.remoteAddress()
instead