2017-08-04 644 views
0

很快,我成功地通过OpenDDS在同一子网中通信两台主机。 但是,我想通过公共网络或WAN与其他两台主机进行通信。它不起作用。 我该如何解决这个问题?OpenDDS:如何通过公共网络(WAN)与两台主机进行通信

这是我的交流环境:

我有两个主机。 HostA是AWS(亚马逊网络服务),主机B是我的Destktop。另外,两台主机拥有公共IP地址并禁用防火墙。我已经通过telnet命令检查了特定端口号是否可用。像这样:

$ telnet <HostA IP's> 12345 

这是很好的连接。

我用OpenDDS-3.11和$OpenDDS_HOME/tests/DCPS/Messenger的例子。

在玉簪,使

$ DCPSInfoRepo -ORBListenEndpoints iiop://:12345 

用户操作是这样的:

$ ./subscriber -DCPSConfigFile sub_multicast.ini 

在主机B,

目录是相同subsceriber然后出版商这样操作的:

$ ./publisher -DCPSInfoRepo <HostA's IP>:12345 -DCPSConfigFile pub_multicast.ini 

发行者的返回错误的讯息:

$ ./publisher -DCPSInfoRepo <HostA' IP>:12345 -DCPSConfigFile pub_multicast.ini 
Starting publisher 
(3074|140050504111936) NOTICE: using DCPSInfoRepo value from command option (overrides value if it's in config file). 
Starting publisher with 1 args 
(3074|140050504111936) EXCEPTION, ERROR: InfoRepoDiscovery::get_dcps_info: failed to resolve ior - 
system exception, ID 'IDL:omg.org/CORBA/TRANSIENT:1.0' 
OMG minor code (2), described as 'No usable profile in IOR.', completed = NO 

(3074|140050504111936) ERROR: DomainParticipantFactoryImpl::create_participant, add_domain_participant returned invalid id. 
publisher.cpp:66: main() ERROR: create_participant failed! 
ERROR: InfoRepoDiscovery::~InfoRepoDiscovery - Exception caught during ORB shutdown: system exception, ID 'IDL:omg.org/CORBA/BAD_INV_ORDER:1.0' 
OMG minor code (4), described as 'ORB has shutdown.', completed = NO 

我做了什么错?

回答

0

我终于解决了我的问题 只需更改发现服务器主机并使用rtps_uni.ini文件即可。 这样的:

DCPSInfoRepo -ORBListenEndpoints iiop://:12345 

加入者侧:

./subscriber -DCPSDebugLevel=5 -DCPSInfoRepo HostA:12345 -DCPSConfigFile rtps_uni.ini 

出版商侧:

./publisher -DCPSInfoRepo HostA:12345 -DCPSConfigFile rtps_uni.ini 
0

我对同一个问题有兴趣。我想从AWS到我的应用程序执行类似的运行。

当前使用websocket桥接路由器Nat问题。我正在本地网络中运行dcpsInfoRepo。但是我在不同子网中的设备发现问题。我不确定多播是否被所有路由器支持。所以使用tcp连接。

相关问题