[ERROR] [1583754648.504890309]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying

I just was trying to do all the steps in ROS2 basic c++ course. And got the error:

[ERROR] [1583754648.504890309]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying…

user:~$ source ~/.bashrc_bridge
ROS_DISTRO was set to ‘melodic’ before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to ‘dashing’ before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to ‘melodic’ before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to ‘dashing’ before. Please make sure that the environment does not mix paths from different distributions.
user:~$ export ROS_MASTER_URI=http://localhost:11311
user:~$ ros2 run ros1_bridge dynamic_bridge
[ERROR] [1583754492.787546360]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying…
^Cuser:~$ ros2 run ros1_bridge dynamic_bridge
[ERROR] [1583754600.699351672]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying…
^C^Cuser:~$ source ~/.bashrc_bridge
ROS_DISTRO was set to ‘melodic’ before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to ‘dashing’ before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to ‘melodic’ before. Please make sure that the environment does not mix paths from different distributions.
ROS_DISTRO was set to ‘dashing’ before. Please make sure that the environment does not mix paths from different distributions.
user:~$ export ROS_MASTER_URI=http://localhost:11311
user:~$ ros2 run ros1_bridge dynamic_bridge
[ERROR] [1583754648.504890309]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying…

Hi @putienkosanerok,

Thank you for contacting us and welcome to the Community!

I apologize for this error. Could you please run the following to change the ROS Mater URI and check again?

export ROS_MASTER_URI=http://master:11311

Thank you for quick response. For me it works now.

1 Like

Hello @bayodesegun,

It happened with me as well. Why don’t you update the notes? By default ROS_MASTER_URI seems to be correct. Please delete the additional instruction to change URI from the notes.

Thanks,
Kashish Dhal

Hi @kashish.dhal,

Thank you for your suggestion - you have a good point there!

Let me check with the course owner and get back to you later today.


Btw, welcome to the Community!

Thanks for the consideration @bayodesegun

1 Like

Also, if I want to send a message to the support people regarding some personal issue, where I do that?

You can leave us feedback by

If you would like to post a feature request, please click here .

I am doing the ROS2 C++ course, and have got stuck with ‘Unit 2 Topics Part 2’. The solutions for exercise 2.4 to create a ROS1 Bridge node are as follows:

source ~/.bashrc_bridge
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge

This failed to contact ‘localhost:11311’ so I found this thread and I have changed the ROBOT_MASTER_URI using the following:

export ROS_MASTER_URI=http://master:11311

I get the same error as before but this time for the master:11311.

Please could you:

  1. Solve this error
  2. Update the notes here

Hi Sam, welcome to the community! And thank you for this great feedback. We are constantly improving our courses from suggestions like this. We’ll work on these issues.

The link that you’ve added seems to be broken for me, would you mind sending it again or take a screenshot of what you’re trying to show us?

Hi,

The link goes to the Jupyter page “Solutions for Unit 2 Topics Part 2” on the ROS2 C++ course, its name is “ros2_topics_part2_solutions_cpp”. The part of the notebook that should be changed is here:
image
Where ROS_MASTER_URI=http://localhost:11311 should be changed to whichever host that gets solved.

Thank you,
Sam

1 Like