Ask Your Question
0

rostest: fails when using ROS_HOSTNAME (single PC)

asked 2018-03-19 06:27:30 -0500

knxa gravatar image

My rostest fails with this error:

Couldn't find an AF_INET address for [mypc.local]

It does not fail consistently in the same place.

I have no problems with:

ping mypc.local

However, rostest succeeds when run like this:

roscore &
rostest --reuse-master foo foo.test

And it also succeeds when doing:

unset ROS_HOSTNAME
export ROS_IP=<my IP address>
rostest foo foo.test

... but I do not want to maintain a fixed IP, that's the whole point of DNS!

  1. Why is ROS_HOSTNAME not working for my rostest?
  2. Why is the failure not consistent? Could this be a symptom of a parameter server with too high load?
edit retag flag offensive close merge delete

Comments

Intermittent failures in hostname resolution could cause this. The fact that ping works does not guarantee your infrastructure is ok. Is mypc.local set in /etc/hosts, or is a DNS serving that domain? ROS_IP working always would seem to point to problems with DNS.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-19 06:38:29 -0500 )edit

Thanks. I have only mypc in /etc/hosts. If I add mypc.local, my rostest works. But I guess I still will have the problem in a multi-machine scenario, where other machines tries to lookup mypc.local? Do you know of any tools to test the consistency of hostname resolution?

knxa gravatar image knxa  ( 2018-03-19 07:26:43 -0500 )edit

.. experience with any tools in particular, so can't recommend any.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-19 07:37:07 -0500 )edit

Can you explain why my rostest works with the --reuse-master option? In all the above, does it matter what ROS_MASTER_URI is set to? (It is http://localhost:11311)

knxa gravatar image knxa  ( 2018-03-19 07:42:18 -0500 )edit
1

Can you explain why my rostest works with the --reuse-master option?

No.

In all the above, does it matter what ROS_MASTER_URI is set to? (It is http://localhost:11311)

you should not need to set ROS_MASTER_URI unless:

  • this is a multi-homed system and the default doesn't work.

..

gvdhoorn gravatar image gvdhoorn  ( 2018-03-19 08:28:26 -0500 )edit
1
  • this is a multi-host ROS application

localhost is fine, as long as you have a roscore running that is reachable via that hostname.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-19 08:29:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-03-19 07:36:53 -0500

gvdhoorn gravatar image

If it works when you add the hostname to /etc/hosts that would definitely point to a DNS issue. Whether that is on your machine or with the DNS, I don't know.

Do you know of any tools to test the consistency of hostname resolution?

No, sorry. I'm sure they exist, but I don't have any ..

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-03-19 06:27:30 -0500

Seen: 164 times

Last updated: Mar 19 '18