Open amielc1 opened 4 months ago
Do not start DCPSInfoRepo.
Probably need to pass a config file -DCPSConfigFile
to the RtpsRelay.
Take a look at tests/DCPS/RtpsRelay/Smoke/run_test.pl
- you can build and run this test locally.
See slide 27 in the presentation.
I'm going to repurpose this issue towards eliminating the need for a config file.
@mitza-oci @jrw972 - thank!
I want to connect Pub&Sub application to RtpsRelays, I Use RtpsRelay & Pub Sub configurations from tests/DCPS/RtpsRelay/Smoke all the ini configs taken from this folder(I didn't change noting) I run_test.pl but tests failed.
monitor
& metachecker
applicationERROR: executable "monitor" does not exist; subdir: ./; basename: monitor ; dirname: . ERROR: executable "metachecker" does not exist; subdir: ./; basename: metachecker ; dirname: . runRtpsLogs.txt
I got this error from rtpsRelay1
2024-06-10 15:38:39.676@LM_ERROR@(6092|32656) ERROR: could not open RelayHttpMetaDiscovery
relay1.log
I take a look in pub_rtps.ini
file. about DataRtpsRelayAddress=127.0.0.1:4446
, the meaning is to where we send the messages (my idls). in which we need to configure to receive this message, or, I thought to find who listens to this port, to receive the messages - but I didn't find anything.
udp.port == 4445 || udp.port == 5444 || udp.port == 5445 || udp.port == 5446 || udp.port == 4444 || udp.port == 4446
.there is smarter way? @jrw972 - Your presentation is great 🥇 , but you didnt show how to use. its very usefull 🙏
executable "monitor" does not exist
=> Build the tests before attempting to run them.
@mitza-oci yes. I already built the full solution, with the test, but I didn't find the monitor.exe
Adam, can you help me with the rest of the questions please.
I appreciate you!
@mitza-oci yes. I already built the full solution, with the test, but I didn't find the monitor.exe
https://opendds.readthedocs.io/en/latest-release/devguide/building/index.html#tests
For (2), See the MetaDiscovery options in https://opendds.readthedocs.io/en/latest-release/devguide/internet_enabled_rtps.html#usage.
For (3), The relay from the example listens on localhost ports 4444 (SPDP), 4445 (SEDP), and 4446 (DATA). The publisher and subscriber both need to be configured to access the relay at those ports.
For (4), I don't know of a smarter way. I usually capture everything and then filter it down.
Thanks @jrw972 ,
This is the ini
configuration for the publisher and subscriber, (this is yours files), they both didn't configured to access the relay at those ports. Why ?
Thanks Justin - I appreciate your help 💯
The Smoke Test is intentionally complicated to test the clustering abilities of the RtpsRelay. It assumes that two RtpsRelay instances are running. The publisher connects to one and the subscriber to the other. If everything works, a message from the publisher is sent to the first relay, then from the first relay to the second relay, and then from the second relay to the subscriber. If you are just running one relay, then use the same ip/ports in both your pub and sub config files or just use a single config file.
@jrw972 i exactly try to run 2 Relay & PubSub. So I don't understand why I should have a different configuration. It should be exactly the same configuration as you have in SMOKE. And so I ask, why am I getting the error
2024-06-10 15:38:39.676@LM_ERROR@(6092|32656) ERROR: could not open RelayHttpMetaDiscovery
while you didn't work with MetaDiscovery options
If you want to run exactly like the smoke test, then you should run the smoke test ./run_test.pl
. It will print out the command lines for both relays, the publisher, the subscriber, the monitor, and the metachecker.
You don't need monitor or the metachecker, they are for the test.
Start the two relays, then start the publisher and then the subscriber.
Because the MetaDiscovery options were added after the presentation.
@jrw972 @mitza-oci , I'm confuse, I succeded run all my apps & relays but I can get messages from publisher. All my applications work in domain 42. I run the PubSub from Visual Studio Am I need to run these apps with security parameters? The relays I run from cmd (without yours perl's script)
This is my Publisher in :
[common] DCPSGlobalTransportConfig=$file DCPSThreadStatusInterval=1 DCPSDebugLevel=10 ORBLogFile=HelloWorldRtpsPublisher.log ORBDebugLevel=10
[domain/42] DiscoveryConfig=rtps_discovery
[rtps_discovery/rtps_discovery] InteropMulticastOverride=239.255.0.2 SedpMulticast=0 SpdpRtpsRelayAddress=127.0.0.1:5444 SedpRtpsRelayAddress=127.0.0.1:5445 RtpsRelayOnly=1 SedpMaxMessageSize=1400
[transport/pub_rtps] transport_type=rtps_udp use_multicast=0 DataRtpsRelayAddress=127.0.0.1:5446 RtpsRelayOnly=1 max_message_size=1400
This is My Subscriber ini :
[common] DCPSGlobalTransportConfig=$file DCPSThreadStatusInterval=1 DCPSDebugLevel=10 ORBLogFile=HelloWorldRtpsSubscriber.log ORBDebugLevel=10
[domain/42] DiscoveryConfig=rtps_discovery
[rtps_discovery/rtps_discovery] InteropMulticastOverride=239.255.0.2 SedpMulticast=0 SpdpRtpsRelayAddress=127.0.0.1:4444 SedpRtpsRelayAddress=127.0.0.1:4445 RtpsRelayOnly=1 SedpMaxMessageSize=1400
[transport/pub_rtps] transport_type=rtps_udp use_multicast=0 DataRtpsRelayAddress=127.0.0.1:4446 RtpsRelayOnly=1 max_message_size=1400
The RtpsRelay1 ini :
[common] DCPSGlobalTransportConfig=$file DCPSThreadStatusInterval=2
[domain/0] DiscoveryConfig=relay_rtps_discovery
[rtps_discovery/relay_rtps_discovery] SedpMulticast=0
[transport/relay1] transport_type=rtps_udp use_multicast=0
[domain/42] DiscoveryConfig=application_rtps_discovery
[rtps_discovery/application_rtps_discovery] SedpMulticast=0 SpdpRtpsRelayAddress=127.0.0.1:4444 SedpRtpsRelayAddress=127.0.0.1:4445 RtpsRelayOnly=1 SedpMaxMessageSize=1400 UndirectedSpdp=0 PeriodicDirectedSpdp=1
The RtpsRelay2 ini :
[common] DCPSGlobalTransportConfig=$file DCPSThreadStatusInterval=2
[domain/0] DiscoveryConfig=relay_rtps_discovery
[rtps_discovery/relay_rtps_discovery] SedpMulticast=0
[transport/relay2] transport_type=rtps_udp use_multicast=0
[domain/42] DiscoveryConfig=application_rtps_discovery
[rtps_discovery/application_rtps_discovery] SedpMulticast=0 SpdpRtpsRelayAddress=127.0.0.1:5444 SedpRtpsRelayAddress=127.0.0.1:5445 RtpsRelayOnly=1 SedpMaxMessageSize=1400 UndirectedSpdp=0 PeriodicDirectedSpdp=1
I run the relays from cmd:
RtpsRelay.EXE -Id relay1 -UserData relay1 -DCPSConfigFile relay1.ini -ApplicationDomain 42 -ORBLogFile relay1.log -VerticalAddress 127.0.0.1:4444 -HorizontalAddress 127.0.0.1:11444 -MetaDiscoveryAddress 127.0.0.1:8082 -DCPSDebugLevel 1 -DCPSSecurityDebugLevel 2 -LogDiscovery 1 -LogActivity 1 -LogThreadStatus 1 -LogRelayStatistics 3 -LogParticipantStatistics 1 -ORBVerboseLogging 1 -DCPSPendingTimeout 3
RtpsRelay.EXE -Id relay2 -UserData relay2 -DCPSConfigFile relay2.ini -ApplicationDomain 42 -ORBLogFile relay2.log -VerticalAddress 127.0.0.1:5444 -HorizontalAddress 127.0.0.1:11544 -DCPSDebugLevel 1 -DCPSSecurityDebugLevel 2 -LogDiscovery 1 -LogActivity 1 -LogThreadStatus 1 -LogRelayStatistics 3 -LogParticipantStatistics 1 -ORBVerboseLogging 1 -DCPSPendingTimeout 3
You might not need security parameters but you do need all of the parameters printed by run_test.pl
.
There should be log files which will probably indicate what the issue is.
can you tell me witch logs can I send you? I have 4, publisher. subscriber, relay1, relay2. is there something else?
Post them all as attachments.
@jrw972 & @mitza-oci - Thanks a lot for yours support! These are logs, HelloWorldRtpsSubscriber.log HelloWorldRtpsPublisher.log relay1.log relay2.log
Note : In this case, I try to use :
OpenDDS 3.25 had a bug that affected the RtpsRelay. I'm assuming that OpenDDSSharp is based on 3.25 so just upgrading to 3.28.1 is not an option. In that case, you may need to manually apply the changes from https://github.com/OpenDDS/OpenDDS/pull/4485 to solve your issue.
@jrw972 , @mitza-oci thank you!
You need to compile the OpenDDS used by OpenDDSSharp with those changes.
The problem is not in the RtpsRelay, it is in the version used by the publisher and subscriber. Fixing (1) should address the issue.
Hi @jrw972 @mitza-oci
I Use the latest OpenDDSharp, 3.281.1 - for my publisher & subscriber via your Rtps Relay - as I described in the previous comments - still doesn't work. can you give me some advice?
logs relay1.log relay2.log Publisher.log Subscriber.log
config ini relay1.txt relay2.txt rtps_pub.txt rtps_sub.txt
Try adding CheckSourceIp=false
like so
[common]
DCPSGlobalTransportConfig=$file
DCPSThreadStatusInterval=2
[domain/0]
DiscoveryConfig=relay_rtps_discovery
[rtps_discovery/relay_rtps_discovery]
SedpMulticast=0
[transport/relay1]
transport_type=rtps_udp
use_multicast=0
[domain/42]
DiscoveryConfig=application_rtps_discovery
[rtps_discovery/application_rtps_discovery]
SedpMulticast=0
SpdpRtpsRelayAddress=127.0.0.1:4444
SedpRtpsRelayAddress=127.0.0.1:4445
RtpsRelayOnly=1
SedpMaxMessageSize=1400
UndirectedSpdp=0
PeriodicDirectedSpdp=1
CheckSourceIp=false
I'll create an issue to add this to the smoke test.
BTW - the logs show that your publisher and subscriber are sending messages to the relay. Look for record_activity
.
@jrw972 it still doesn't work - my subscriber didn't get any message (with multicast everything ok)
where is the point?
I should have been more specific, you need to add CheckSourceIp=false
to both relay configuration files. At the very bottom as shown in the example will work.
Lines containing record_activity
will occur in the logs produced by the relay.
I need to run RtpsRelay from my computer (not from docker) I tried to run the RtpsRelay tool
RtpsRelay -Id id5555
I got an error :
Do I need to run
DCPSInfoRepo -o repo.ior
in parallel? if it's true - I got another exception. Do you have a guide to use RtpsRealy on local ? i use : This presentation This aricle and thisThanks a lot for your support! Amiel
Edit from @jrw972
The long-term goal should be to run the RtpsRelay without a config file. This is now possible since environment variables and arguments can be used. A user can specify a file if they wish. Before starting, the configuration should be checked for mandatory config.