ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

roscore not launching due to weird Computer Name

asked 2014-11-22 09:10:09 -0600

krishna gravatar image

I've installed ROS Indigo (not built from source). Everything seems to have installed perfectly and the first 4 tutorials work well too. However, when I launch roscore, it doesn't launch, and it shows the following error.

Unable to contact my own server at [http://1103:33101/]. This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself. Please check for errors by running:

ping 1103

For more tips, please see

http://www.ros.org/wiki/ROS/NetworkSetup

The traceback for the exception was written to the log file

I've sort of found what the problem is after some speculation.

My computer name is 1103 and user name is desktop (desktop@1103). So, when roscore tries to resolve the hostname "1103", it ends up resolving it to 0.0.4.79 (Verified this on some other hostname resolvers as well!).

Also, here's what "roswtf" outputs: Local network configuration is invalid: Local hostname [1103] resolves to [0.0.4.79], which does not appear to be a local IP address ['127.0.0.1', '172.18.4.40'].

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2014-11-22 14:00:50 -0600

ahendrix gravatar image

This isn't really a ROS problem at all. The underlying library for resolving your hostname to an IP address isn't giving the results you expect, because you've chosen a number as your hostname.

RFC952 specifies that hostnames cannot begin with a number, but RFC1123 specifies that hostnames may be entirely numeric. This has caused some contention in the Debian community.

The bottom line is that you should choose a hostname that is not entirely numeric.

edit flag offensive delete link more

Comments

1

Thank you for the reply. This seems to be a guideline I can live with. I've found another workaround to the problem by setting the environment variable ROS_IP to 127.0.0.1.

krishna gravatar image krishna  ( 2014-11-23 02:35:24 -0600 )edit
0

answered 2014-11-23 02:36:27 -0600

krishna gravatar image

Solved the problem by setting ROS_IP to 127.0.0.1

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-11-22 09:10:09 -0600

Seen: 1,202 times

Last updated: Nov 23 '14