question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discovery fails if daemon is started as root

See original GitHub issue

Bug report

Required Info:

  • Operating System: Ubuntu 20.04
  • Installation type: official foxy docker image
  • Version or commit hash:
  • DDS implementation: rmw_fastrtps_cpp
  • Client library (if applicable):

Steps to reproduce issue

Open two terminal sessions. In the first terminal run:
$ docker run -it --rm --name test ros:foxy
root@f536811845fe:/# apt update -y && apt upgrade -y
...
root@f536811845fe:/# useradd test -m
root@f536811845fe:/# sudo -u test bash
test@f536811845fe:/$  . /opt/ros/foxy/setup.bash
test@f536811845fe:/$ ros2 topic pub /test std_msgs/String "data: Hello"
publisher: beginning loop
publishing #1: std_msgs.msg.String(data='Hello')
...

In second terminal run:
$ docker exec -it test bash
root@f536811845fe:/# . /opt/ros/foxy/setup.bash
root@f536811845fe:/# ros2 topic list
/parameter_events
/rosout

Expected behavior

Topic /test should be visible on topic list

Actual behavior

Topic /test is not present.

Additional information

Even after stopping root-owned _ros2_daemon and starting a new one as “test” user, topics in existing nodes are not discovered.

This issue only appears when ros packages are upgraded to the latest version from apt repository.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
MiguelCompanycommented, Feb 26, 2021

Shared memory transport is active by default since Fast DDS v2.0.2, so I think this is related to eProsima/Fast-DDS#1750

We are currently developing a fix that should avoid this issue. It will basically detect the situation and fallback to UDP communication in that case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oracle Trace File Analyzer Daemon is Not Starting or Not ...
Try starting the Oracle Trace File Analyzer daemon as root . ... If Oracle Trace File Analyzer still fails to start, then run...
Read more >
error "The base daemon is not running" after new install of SE ...
Hi, i've installed SE 6.4.2.3 (uninstalling 6.4.1 and installing 6.4.2.3 because of stor* daemons that did not want to stop), and after ...
Read more >
Test Credentials or Discovery Fails with Access Denied Error
Issue: Test Credentials, Add workload, or Discover workload actions for a source Linux workload fails with the following error: Access denied. The root ......
Read more >
Hadoop CDH3 ERROR. Could not start Hadoop datanode ...
I'm trying with installation from tarball. If i execute start-all.sh it throws May not run daemons as root. Please specify HADOOP_NAMENODE_USER ...
Read more >
Error after upgrading from ADDM 10.1 to 11.0 (Discovery)
Hi Yan, · When I try to start the cluster, I get this · $ sudo /sbin/service cluster stop · Stopping local Discovery...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found