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

DDS communications on k8s [13695]

Open imricardosilva opened this issue 4 years ago • 4 comments

Hi. I'm currently running two containerized applications on Kubernetes (one of them running microROS). Unfortunately, the DDS communications between the two containers are not fully working.

Current Behavior

  • If I run ros2 topic list on container A, I get the list of all topics being published or subscribed by the uROS application on Container B. If I run ros2 topic list on container B, I just get the default topics (/parameter_events, /rosout) and get the following error: [RTCP_MSG_OUT Error] TCPTransport Error binding at port: (50015) with msg: bind: Address already in use

  • If I subscribe to a topic (published from Container B) in Container A, I start getting data after a bunch of errors of type: [RTCP Error] Cannot find an available logical port. -> Function prepare_send_check_logical_ports_req

  • If I publish a new topic in Container A, data starts to appear after a bunch of errors ([RTCP Error] Cannot find an available logical port. -> Function prepare_send_check_logical_ports_req). If I run ros2 topic list in Container B, I can see the new topic, but if I subscribe to it I get: [RTCP_MSG_OUT Error] TCPTransport Error binding at port: (50015) with msg: bind: Address already in use -> Function create_acceptor_socket

System information

Container A

ROS2 Foxy application RMW IMPLEMENTATION rmw_fastrtps_cpp k8s service IP: 10.0.21.135 Ports: 50015/TCP, 50020/TCP Fast RTPS profile ContainerA

Container B

ROS2 Foxy/uROS application RMW IMPLEMENTATION rmw_fastrtps_cpp k8s service IP: 10.0.97.23 Ports: 50015/TCP, 50020/TCP Fast RTPS profile ContainerB

I believe this can be solved with the proper profiles configuration but cannot find the needed fix. Is there something I'm missing or wrongly configuring?

Thanks a lot.

imricardosilva avatar Sep 20 '21 09:09 imricardosilva

Hi, I know this issue was closed and it's been a few months, but do you mind sharing your solution? I'm currently experiencing the same problem

akraus53 avatar Mar 20 '22 12:03 akraus53

Hi @imricardosilva,

I have looked at the configuration files you uploaded and I don't see anything wrong. Moreover, the error message you are getting seems to be because of a configuration of your Kubernetes cluster. I would recommend checking the cluster's network policies to make sure that the TCP port your containers are listening on is not already busy.

rsanchez15 avatar Mar 21 '22 10:03 rsanchez15

Hi @akraus53,

What do you mean by experiencing the same problem? Is your scenario identical to the one described in this Issue? If not, maybe you should open a new Issue or a question in the Fast DDS Discussions portal.

In any case, we are working on a new tool called DDS Router to deploy DDS networks in cloud and highly distributed environments. I suggest you take a look at it as you may find it useful. Also here is an example of how to configure a DDS Router to be deployed on a Kubernetes cluster.

rsanchez15 avatar Mar 21 '22 11:03 rsanchez15

Thanks, I have opened a discussion at the link you sent. The only thing "similar" is the error message [RTCP Error] Cannot find an available logical port. -> Function prepare_send_check_logical_ports_req

akraus53 avatar Mar 21 '22 17:03 akraus53

Hi @imricardosilva and @akraus53. I am closing this issue due to the inability to reproduce it. If it still happens in latest Fast DDS v2.11.0, please feel free to reopen it and provide a new reproducer.

JesusPoderoso avatar Jul 10 '23 14:07 JesusPoderoso