Error: cannot connect to /root port; port port_name failed to activate (invalid address) #2522
-
Hello everyone, When I run the code:
I got the following errors:
Can you tell me what is the mistake I did please? Thank you for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello. The
You can also check the availability of the name server in C++ code via |
Beta Was this translation helpful? Give feedback.
-
I think I already replied to your question on StackOverflow but I'll paste the reply here as well... 😄 Both errors come from the same issue:
This means that the To fix this error you should just run
The You can find a very basic tutorial about ports here: http://www.yarp.it/git-master/note_ports.html |
Beta Was this translation helpful? Give feedback.
Hello. The
/root
port refers to the YARP name server in the default namespace. Please make sure you have started it, e.g. viayarp server
, before running your application. It might require you to add the--write
option. I have tested your code with YARP server down and got the exact same error. Once you start it and run the application again, you should see:You can also check the availability of the name server in C++ code via
yarp::os::Network::checkNetwork()
.