rostest: fails when using ROS_HOSTNAME (single PC)
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!
- Why is ROS_HOSTNAME not working for my rostest?
- Why is the failure not consistent? Could this be a symptom of a parameter server with too high load?
Intermittent failures in hostname resolution could cause this. The fact that
ping
works does not guarantee your infrastructure is ok. Ismypc.local
set in/etc/hosts
, or is a DNS serving that domain?ROS_IP
working always would seem to point to problems with DNS.Thanks. I have only
mypc
in/etc/hosts
. If I addmypc.local
, my rostest works. But I guess I still will have the problem in a multi-machine scenario, where other machines tries to lookupmypc.local
? Do you know of any tools to test the consistency of hostname resolution?.. experience with any tools in particular, so can't recommend any.
Can you explain why my rostest works with the
--reuse-master
option? In all the above, does it matter whatROS_MASTER_URI
is set to? (It ishttp://localhost:11311
)No.
you should not need to set
ROS_MASTER_URI
unless:..
localhost
is fine, as long as you have aroscore
running that is reachable via that hostname.