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

Problem running nodes, master have 'WARNING: ROS_MASTER_URI [http://localhost:11311] host is not set to this machine' and nodes 'Couldn’t find an AF_INET address for [localhost]'

asked 2018-03-01 13:05:23 -0500

mrght gravatar image

updated 2018-03-01 14:03:28 -0500

ahendrix gravatar image

Hi, I have been running ros nodes in my machine but suddenly I got these erros every time when I'm running nodes: Master:

$roscore
(stuff about the starting of the master)
SUMMARY
PARAMETERS
*/rosdistro: kinetic
*/rosversion: 1.12.12
NODES
WARNING: ROS_MASTER_URI [http://localhost:11311] host is not set to this machine
auto-starting new master
process[master]: started with pi [5233]
ROS_MASTER_URI=http://182.168.1.90:11311/
etc.
Any node:
Couldn’t find an AF_INET address for [localhost]
Couldn’t find an AF_INET address for [localhost]
ERROR [1519245068]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying
Couldn’t find an AF_INET address for [localhost]
Couldn’t find an AF_INET address for [localhost]
Couldn’t find an AF_INET address for [localhost] ...
edit retag flag offensive close merge delete

Comments

1

Is there an entry in /etc/hosts for localhost?

ahendrix gravatar image ahendrix  ( 2018-03-01 14:03:43 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-03-02 17:22:51 -0500

Gayan Brahmanage gravatar image

updated 2018-03-02 17:25:32 -0500

Are you running ROS on multiple machines? Probably this might be a network problem. See ROS network setup for more information. Also, check your bashrc file and see whether it is properly configured for your ip.

Check you host name using

sudo nano /etc/hosts

For example:

export ROS_HOSTNAME=136.159.101.186 
export ROS_MASTER_URI=http://136.159.101.186:11311
edit flag offensive delete link more

Comments

1

If you're going to be using IPs, then use ROS_IP, not ROS_HOSTNAME.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-03 04:35:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-03-01 13:05:23 -0500

Seen: 3,140 times

Last updated: Mar 02 '18