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

roscore bug Errno8

asked 2015-11-08 15:40:10 -0500

Fry gravatar image

I've got a new installation of ROS Indigo on OSX Yosemite. In a terminal when I enter: roscore I get the error message:

... 76, in is_local_address local_addresses = ['localhost'] + get_local_addresses() File "/opt/ros/indigo/lib/python2.7/site-packages/rosgraph/network.py", line 240, in get_local_addresses local_addrs = [host[4][0] for host in socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET, 0, socket.SOL_TCP)] gaierror: [Errno 8] nodename nor servname provided, or not known

printenv | grep ROS prints out:

ROS_ROOT=/opt/ros/indigo/share/ros
ROS_PACKAGE_PATH=/opt/ros/indigo/share:/opt/ros/indigo/stacks
ROS_MASTER_URI=http://localhost:11311
ROS_HOSTNAME=localhost
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=indigo
ROS_IP=0.0.0.0
ROS_ETC_DIR=/opt/ros/indigo/etc/ros

I have no /etc/hosts file. ping localhost works. I'm just trying to run ROS master and clients locally on my Mac. Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-11-08 20:31:25 -0500

William gravatar image

Your ROS_IP is 0.0.0.0, but I'm pretty sure that's not valid. Also you shouldn't have to set your ROS_HOSTNAME to anything by default. But neither of those cause the same problem on my mac.

edit flag offensive delete link more
1

answered 2015-11-09 00:41:41 -0500

Fry gravatar image

updated 2015-11-09 00:43:53 -0500

William, thanks for you speedy reply. I took your suggestions and removed both ROS_IP and ROS_HOSTNAME from my .bashrc file to let them default. But that got me back to a previous error when entering roscore into a terminal, and my computer couldn't ping itself under its own name. So I added a line in /etc/hosts of 127.0.0.1 localhost macbook-pro-2.home and that did the trick. Now roscore works. The hard part is how to get at the /etc/hosts file on a mac. Apple makes this really difficult. One workaround is: http://www.tekrevue.com/tip/edit-host... One big victory for ROS answers!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-11-08 15:40:10 -0500

Seen: 457 times

Last updated: Nov 09 '15