Blog:
Solutions for Port Conflict Problem Phenomenon
When ROS is used to control the robotic arm under Ubuntu, "98 Address already in use" error appears, indicating that the port is occupied.
Solution
Shut down or immediately suspend the process that occupies the port, or release the occupied port.
Operation Steps
Method 1: Restart the system.
Method 2: Use the command to turn off the process that occupies the port.
- Open the terminal and execute the following command to query the PID of the process the occupies the port:
sudo netstat -lnp | grep 8080or
sudo lsof -i:8080If a process occupies 8080 port, the command line will display the detailed information about the process, as shown in the figure below.

- Execute the following command to turn off the target process.
sudo kill -9 PIDIf the PID of the process that occupies 8080 port is 3349 or 3669, execute the following command to turn off the target process.
sudo kill -9 3349
sudo kill -9 3669TIP
-9 represents the SIGKILL signal, to force the process to stop running immediately. Then you can use ROS to control the robotic arm normally.

