You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What combination of platform is the Client Library running on.
Linux without realtime patch, Docker, Linux
How did you install the Client Library
Build the library from source
Which robot platform is the library connected to.
Real robot, UR E-series robot
Robot SW / URSim version(s)
polyscope 5.21.x
How are you using the Client Library
Through the robot teach pendant using External Control URCap
Issue details
Summary
[UR_Client_Library:]: Failed to bind socket for port 50002 to address. Reason: Address already in useRetrying in 1 seconds
Issue details
Using UR-ROS2 driver connected to a UR20 robot using external control cap and UR client library. It appears that some times I'm encountering an issue where the TCP server fails to bind to port 50002 with the error Address already in use, even though no active process is using the port (confirmed via lsof -i :50002). I have a short script checking if port is being used or occupied before the driver is launched. Nothing is detected. My suspicion is that the port is likely held in TIME_WAIT state by the OS, causing the bind() call to fail.
Steps to Reproduce
Start the TCP server on port 50002.
Stop the server.
Restart the server quickly (within a few seconds).
Failed to bind socket for port 50002 to address. Reason: Address already in use
Expected Behavior
Actual Behavior
What did you observe? If possible please attach relevant information.
Workaround Suggestion
I am wondering if adding a flag in the TCP bind function will be useful. Ideally, the TCP server should set SO_REUSEADDR before calling bind() to avoid this issue in the future.
I have experienced this problem in the past. On some systems I was able to reproduce this issue somewhat reliable, on others not at all, so I never followed it too much. Though, when writing this I remember, that we even have a sleep in our CI between running the examples because of exactly that reason...
Setting SO_REUSEADDR seems like a reasonable approach to this problem, thank you for pointing us into that direction!
Affected Client Library version(s)
2.0.0
What combination of platform is the Client Library running on.
Linux without realtime patch, Docker, Linux
How did you install the Client Library
Build the library from source
Which robot platform is the library connected to.
Real robot, UR E-series robot
Robot SW / URSim version(s)
polyscope 5.21.x
How are you using the Client Library
Through the robot teach pendant using External Control URCap
Issue details
Summary
[UR_Client_Library:]: Failed to bind socket for port 50002 to address. Reason: Address already in useRetrying in 1 seconds
Issue details
Using UR-ROS2 driver connected to a UR20 robot using external control cap and UR client library. It appears that some times I'm encountering an issue where the TCP server fails to bind to port 50002 with the error Address already in use, even though no active process is using the port (confirmed via lsof -i :50002). I have a short script checking if port is being used or occupied before the driver is launched. Nothing is detected. My suspicion is that the port is likely held in TIME_WAIT state by the OS, causing the bind() call to fail.
Steps to Reproduce
Start the TCP server on port 50002.
Stop the server.
Restart the server quickly (within a few seconds).
Failed to bind socket for port 50002 to address. Reason: Address already in use
Expected Behavior
Actual Behavior
What did you observe? If possible please attach relevant information.
Workaround Suggestion
I am wondering if adding a flag in the TCP bind function will be useful. Ideally, the TCP server should set SO_REUSEADDR before calling bind() to avoid this issue in the future.
Universal_Robots_Client_Library/src/comm/tcp_server.cpp
Line 132 in ccc2e5a
Relevant log output
Accept Public visibility
The text was updated successfully, but these errors were encountered: