Kris20030907 commented on issue #9290:
URL: https://github.com/apache/rocketmq/issues/9290#issuecomment-2765500630

   @gaoyf  Hey, I found the problem. When calling invokeSync, the addedr passed 
in is null, just like the method I modified now:
   
   <img width="1207" alt="Image" 
src="https://github.com/user-attachments/assets/f50d757f-2631-4ba5-b72b-33d33fa600f7";
 />
   The remotingClinet method will be called in the end:
   
   <img width="1364" alt="Image" 
src="https://github.com/user-attachments/assets/32c38f59-57f9-4c19-bb83-86d586a4b818";
 />
   
   According to the existing logic, you can see that `Channel channel = 
this.getAndCreateChannel(addr);` will eventually get the selected namesrv 
address and further get the channel:
   
   <img width="1182" alt="Image" 
src="https://github.com/user-attachments/assets/b6a0f47e-7fcf-4581-a320-f367b81bfcae";
 />
   
   Although the RemotingTimeOut exception can be captured at this time, addr is 
null and the corresponding channel cannot be closed:
   
   <img width="1229" alt="Image" 
src="https://github.com/user-attachments/assets/81a619eb-6fb4-4cbf-a03f-bdb3bc463a06";
 />
   
   In other words, the connection established with the unhealthy namesrv will 
not be closed, resulting in a hang.
   


-- 
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]

Reply via email to