-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to exchange Messages between two docker containers when run on host network option.(--network=host) [14317] #2624
Comments
Hi @sreemtech , This has in fact been reported before in #1698, #1750, and #1755, and has a partial fix (not really ready to be merge in master) in #1801. Although I'm closing this ticket as a duplicate, I'll briefly explain the problem and possible workarounds here for traceability. The source of the problem
Possible workaroundsUntil Fast DDS establishes a more reliable way of discerning whether two
Hope that helps! |
@EduPonz . Thanks. I will try the work around. Thanks for the very speedy support. |
@EduPonz I have the issue on TCP with no message exchange. I am working on the same subnet (server and client are running in two containers using the host network) I have two containers using the host Ip address and wanted to exchange message via TCP. any advise here please? |
Hi @sreemtech , I have not been able to reproduce your issue using the Fast DDS Suite Docker image for v2.6.0. Terminal 1docker run -it --rm --network=host ubuntu-fastdds-suite:v2.6.0 Within the container goToExamples
cd DDS/HelloWorldExampleTCP/bin/
./DDSHelloWorldExampleTCP publisher -a 192.168.1.42 -p 5050 Terminal 2docker run -it --rm --network=host ubuntu-fastdds-suite:v2.6.0 Within the container goToExamples
cd DDS/HelloWorldExampleTCP/bin/
./DDSHelloWorldExampleTCP subscriber -a 192.168.1.42 -p 5050 Discovery may take a bit (it's slower when using the TCP transport due to handshakes and such), but after a while I can receive samples with no problems. Can you please verify? If that works (it does for me), then we should take a look at your Dockerfile to try to spot differences. |
hi |
I hit enter too soon, I've updated my comment. |
Hi @EduPonz Hi But interestingly I found something else if I have the setup as below Container A: Ip: 172.19.168.186 Container B : Ip: 172.19.168.157 Problem : 1. Both subscribers on Container A and Container B receives it - Good and expected behavior |
Hi @EduPonz Another issue I have found - After handshake With Container A and Container B - the messages are not receving from the begining Container A : Container B : If you look at the above we lost the messages and Container B receving only from the index "78" |
Hi @sreemtech
This I have not been able to reproduce en v2.6.0. I have three questions:
This is to be expected according to the example's Qos. The history is configured to keep last 30 both for the publisher and subscriber, so late joiners may not receive all the samples. |
Hi @EduPonz Cloned Latest - git clone https://github.com/eProsima/Fast-DDS.git 7124ff8 refs/tags/v2.6.0 Last commit |
Then I guess we'll need to spot differences between your setup and mine. Have you tried reproducing as I did here? |
@EduPonz Let me try with another testing with your approach and with history settings . Thanks again for the speedy support. |
@EduPonz with history settings I see the improvement in packets. But I still see some missing packets when both starts simultenously , could be our network issue but still I am not sure. Thanks once gain . You close the ticket now please |
Hey there! How can I configure a Fast RTPS profile such as below?
Here is the profile I use: <?xml version='1.0' encoding='UTF-8' ?>
<dds>
<profiles
xmlns='http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles'>
<participant profile_name='super_client_profile' is_default_profile='true'>
<rtps>
<builtin>
<discovery_config>
<discoveryProtocol>SUPER_CLIENT</discoveryProtocol>
<discoveryServersList>
<RemoteServer prefix='44.53.00.5f.45.50.52.4f.53.49.4d.41'>
<metatrafficUnicastLocatorList>
<locator>
<udpv4>
<address>10.244.0.221</address>
<port>11811</port>
</udpv4>
</locator>
</metatrafficUnicastLocatorList>
</RemoteServer>
</discoveryServersList>
</discovery_config>
</builtin>
</rtps>
</participant>
</profiles>
</dds> This profile is already working connecting to a discovery server. I want this profile to support messages only using UDPv4. I would be appreciated if anyone could help me on this. |
@tunahanertekin For questions like yours, we have the Discussions forum. I posted a copy of your question in #3262 and will answer there. |
I have created this repository with my setup to build (as root user) and run (with host's user id) ROS 2 packages/ nodes inside containers with the |
Is there an already existing issue for this?
Expected behavior
Two docker containers should be able to exchange messages that runs on Host network
Current behavior
Two processes in two different containers which run on the host network
Container A Published messages and Container B not receiving the messages
Container A and Container B are created on --network=host
Steps to reproduce
a. docker run -it --privileged --network=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
ubuntu-fastdds-suite:
b. docker run -it --privileged --network=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
ubuntu-fastdds-suite:
publish message from a to b . b is not receiving message
Fast DDS version/commit
v.2.3.0-1.-249
Platform/Architecture
Ubuntu Focal 20.04 arm64
Transport layer
Default configuration, UDPv4 & SHM
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered: