Robotics StackExchange | Archived questions

Error: 'Connection refused' (errno: 111)

Hi All,

I'm having difficulty connecting to my fanuc robot with ROS Melodic. I'm running the command:

roslaunch fanuc_lrmate200id7l_moveit_config moveit_planning_execution.launch sim:=false robot_ip:=10.4.130.7

which gives me this error:

Failed to connect to server, rc: -1. Error: 'Connection refused' (errno: 111)

I'm quite sure that it is not a strict connection issue as when I ping 10.4.130.7, I receive responses from the robot. I'd appreciate any help and please let me know if I did not provide enough information.

Additionally, I have difficulties running the ROS TPE program. When I run it and let go of shift, it occasionally ends the program. The above error occurs even when the ROS program runs as expected.

Asked by m_e_w on 2022-12-09 21:08:09 UTC

Comments

Answers

I'm quite sure that it is not a strict connection issue as when I ping 10.4.130.7, I receive responses from the robot

seeing as ICMP uses different ports than fanuc_driver, being able to ping your controller does not mean other ports are not being blocked or filtered -- by a firewall for instance.

Additionally, I have difficulties running the ROS TPE program

trying to connect without everything running on the Fanuc controller will not work. Until you've got that fixed, there isn't really any point in trying to diagnose connection issues.

When I run it and let go of shift, it occasionally ends the program

ends or pauses? In manual mode, you will have to keep pressing the deadman and shift, there is no other way. If you let go of either, the controller will pause the TP program(s) -- or at least those with locked motion groups.

Once you've started things as you normally do (or did), please open http://10.4.130.7/MD/PRGSTATE.DG and check the state of ROS, ROS_MOVESM, ROS_STATE and ROS_RELAY.


Edit:

I'm currently running it out of a virtual machine configured with Ubuntu 18. Do you think this may the reason why I am unable to connect?

Please open http://10.4.130.7/MD/PRGSTATE.DG after you've started the main ROS program and check the state of ROS, ROS_MOVESM, ROS_STATE and ROS_RELAY. Copy-paste their entries here. You'll probably have to edit your original post, as comments don't allow for enough characters.

To rule out any problems with the ROS nodes: try using nc 10.4.130.7 80 from your Ubuntu VM and see whether that returns anything. If it does, start the ROS program again and try nc 10.4.130.7 11002. If that doesn't connect, something is still blocking the connection, or the ROS_STATE program isn't running.

Holding the deadman and shift fixes the paused TP program, but the connection error still exists.

[ WARN] [1670888864.349857777]: Joint velocity-limits unspecified.  Using default velocity-ratio.
[ERROR] [1670888866.379007986]: Failed to connect to server, rc: -1. Error: 'Connection refused' (errno: 111)
[ERROR] [1670888867.200420559]: Controller is taking too long to execute trajectory (the expected upper bound for the trajectory execution was 2.849237 seconds). Stopping trajectory.

Additionally, this error is popping up as well. I saw that a few other users had it but wasn't able to diagnose the cause.

there doesn't appear to be much use trying to execute trajectories if the ROS nodes can't connect, so the errors you quote are expected at this point.

Asked by gvdhoorn on 2022-12-11 09:12:05 UTC

Comments

seeing as ICMP uses different ports than fanuc_driver, being able to ping your controller does not mean other ports are not being blocked or filtered -- by a firewall for instance.

I'm currently running it out of a virtual machine configured with Ubuntu 18. Do you think this may the reason why I am unable to connect?

Holding the deadman and shift fixes the paused TP program, but the connection error still exists.

[ WARN] [1670888864.349857777]: Joint velocity-limits unspecified.  Using default velocity-ratio.
[ERROR] [1670888866.379007986]: Failed to connect to server, rc: -1. Error: 'Connection refused' (errno: 111)
[ERROR] [1670888867.200420559]: Controller is taking too long to execute trajectory (the expected upper bound for the trajectory execution was 2.849237 seconds). Stopping trajectory.

Additionally, this error is popping up as well. I saw that a few other users had it but wasn't able to diagnose the cause.

Asked by m_e_w on 2022-12-12 18:53:43 UTC