Fast-DDS icon indicating copy to clipboard operation
Fast-DDS copied to clipboard

FastDDS Discovery Server does not work locally without a network connection [13652]

Open ralph-lange opened this issue 4 years ago • 3 comments

Bug report

Required Info:

  • Operating System: Ubuntu 20.04
  • ROS Distro: Galactic
  • Installation type: Binaries
  • Version or commit hash: 5.0.0-2 (release version of ros-galactic-rmw-fastrtps-cpp)

Steps to reproduce issue

  • Disable all network connections (unplug Ethernet, turn off WiFi)
  • Source the ROS Galactic installation
  • Invoke fastdds discovery -i 0 on a console (cf. https://fast-dds.docs.eprosima.com/en/latest/fastdds/ros2/discovery_server/ros2_discovery_server.html#setup-discovery-server)

Expected behavior

Discovery server should start up or give a meaningful error message that at least one network connection is required.

Actual behavior

The command stops immediately with output

[PARTICIPANT ERROR] Problem creating RTPSParticipant -> Function createParticipant
fastdds discovery <discovery-args>

1
 fast-discovery-server tool not found!

... which suggests an incomplete installation, which is not true.

Additional information

The same error occurs on Foxy and Rolling. If the computer has a network connection (WiFi, Ethernet), then the whole demo in Section 16.2.3 from https://fast-dds.docs.eprosima.com/en/latest/fastdds/ros2/discovery_server/ros2_discovery_server.html#run-the-demo runs smoothly.

ralph-lange avatar Jun 30 '21 14:06 ralph-lange

Moved from https://github.com/ros2/rmw_fastrtps/issues/545.

ralph-lange avatar Jun 30 '21 14:06 ralph-lange

Hi @ralph-lange, I have been struggling with the right approach for discovery on localhost and I am not sure what the right solution is. But in mind, there shouldn't be any need to use discovery server on localhost because there is no limitation of traffic on the loopback interface? Even if there is, can't shared memory be used for discovery traffic?

Despite this we saw issues where ROS services weren't discover-able without the discovery server on localhost. Just wanted to check with a fellow user who has tried discovery server on localhost, what made you try discovery server?

aditya2592 avatar Jul 06 '22 15:07 aditya2592

You're right, there is no need for the discovery server in the setup described above. Therefore, a meaningful error message would be sufficient for me.

I observed the problem in a use-case that is probably not so rare: I was working with a colleague in parallel on the same robot and recorded some topics in bag files. To not interfere with the live system when replaying the bag files, I disconnected from the network and ran into the issue described above.

ralph-lange avatar Jul 07 '22 06:07 ralph-lange

Hi @ralph-lange, Sorry for the delay in the response and thanks for the report. You are right, a meaningful message should be shown in that case. The log message was introduced in #2396. Please check if that solved the issue and feel free to reopen the ticket if the issue still persists.

@aditya2592 thanks for the contribution.

Mario-DL avatar Jun 22 '23 05:06 Mario-DL

LGTM. Thank you @aditya2592 and @Mario-DL.

ralph-lange avatar Jun 22 '23 06:06 ralph-lange