Skip to content

[BUG] Gateway in a bridge-network container is unreachable from the host, and one gateway shows up as four nodes #703

Description

@bburda

Bug report

Steps to reproduce

  1. Install ros-jazzy-ros2-medkit-gateway in a container on a bridge network and publish the port (-p 8080:8080).
  2. In the container run ros2 launch ros2_medkit_gateway bringup.launch.py.
  3. On the host run curl http://localhost:8080/api/v1/areas.
  4. In the container run ros2 node list and ros2 param list /ros2_medkit_gateway.

Expected behavior

  • The host reaches the API through the published port, or the docs name the launch argument that makes it work.
  • One gateway process shows up as one node.

Actual behavior

  • The host gets curl: (56) Recv failure: Connection reset by peer. The startup log says REST API at 127.0.0.1:8080, so the gateway listens on the container's loopback. The troubleshooting page only lists "Connection refused". The README tells native users to set cors.allowed_origins, which the launch files already do.
  • ros2 node list shows /ros2_medkit_gateway four times and warns about duplicate names. The log has Publisher already registered for node name: 'ros2_medkit_gateway' three times, and ros2 param list /ros2_medkit_gateway prints every parameter four times. The fault-service clients, the lifecycle state reader and the subscription executor each create an rclcpp::Node, and all of them take the -r __node:=ros2_medkit_gateway that launch_ros adds to the whole process.

Environment

  • ros2_medkit version: 0.6.0 (apt) and main
  • ROS 2 distro: Jazzy
  • OS: Ubuntu 24.04

Additional information

The gateway unit suite also times out now and then under ctest -j16. test_discovery_manager, test_ros2_topic_data_provider and test_ros2_subscription_executor hang when TearDown cancels the executor before the spin thread has entered spin(). test_node_death_integration reads fault reports after a fixed sleep and sometimes sees a report one tick late.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions