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

roscore failed to contact master at localhost:11311

asked 2021-12-02 05:10:39 -0500

honeybunny gravatar image

Hi,

I have ROS Kinetic with multiple nodes on Ubuntu 16.04 LTS installed and everything was working fine. Then I tried to get one GitHub Repo running, so I installed some packages, did the usual sudo apt-get upgrade and update. I tried to setup cv_bridge once more by setting up a new workspace for cv_bridge, created this workspace and initialized it. I think I got some erros by doing so and I had to delete some devel and build folders.

After that I tried so test my node but got an error, that even my roscore is not working properly. After roscore I get: started roslaunch server http://localhost:37885/

ros_comm version 1.12.14

...

process[master]: started with pid [26554]

ROS_MATER_URI=http://localhost:1131

setting /run_id to "random_number"

process[rosout-1]: startet with pid [26567]

started core service [/rosout]

[ERROR] [1638440731,807494063]: [registerService]Failed to contact master at [localhost:11311].

Retrying ...

What's going on here? I have seen this error on this forum, where nodes failed to connect to master, because roscore wasn't running, but I haven't seen the roscore failing to contact master before.

In my bash.rc the last lines are edited to:

export ROS_HOSTNAME=localhost export ROS_MASTER_URI=http://localhost:11311

The output of hostname is: Autera and the output of hostname -I is 192.168.2.15 192.168.0.111

The output of roswtf is:

Static checks summary

No erros of warnings

...

Online checks summary

No errors or warnings

I can ping 192.168.2.15, 192.168.0.111, localhost and Autera.

Nothing unusual to see after catkin config as well.

ROS also compiles after catkin_make without errors.

I don't know what to do neither am I sure what I have done to get this weird error. I worked perfectly and all of the sudden this.

Do you guys have any advice? Is it maybe possible to reinstall ROS Kinetic and copy all my packages in this freshly installed ROS workspace or will I loose all my installed dependencies?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-12-03 04:06:37 -0500

honeybunny gravatar image

I solved the problem by updating things with Ubuntu Software Updater. Sadly I don't know what caused the error now.

edit flag offensive delete link more

Comments

Thank you for sharing. It would be nice to know. One thing to consider ROS Kinetic is no longer supported, so moving to Noetic is advised or ROS2

Refer to: https://ubuntu.com/blog/ros-kinetic-a...

osilva gravatar image osilva  ( 2021-12-03 05:19:49 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-12-02 05:10:39 -0500

Seen: 1,051 times

Last updated: Dec 03 '21