【问题标题】:OpenDDS: how to communicate two hosts through public network (WAN)OpenDDS:如何通过公共网络(WAN)通信两台主机
【发布时间】:2017-08-04 08:10:54
【问题描述】:

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

这是我的交流环境:

我有两个主机。 HostA 是 AWS(Amazon Web Service),Host B 是我的 Destktop。此外,两台主机具有公共 IP 地址并禁用防火墙。我已经通过 telnet 命令检查了特定端口号是否可用。像这样:

$ telnet <HostA IP's> 12345

这是很好的连接。

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

在 HostA 中,启用

$ DCPSInfoRepo -ORBListenEndpoints iiop://:12345

订阅者操作​​如下:

$ ./subscriber -DCPSConfigFile sub_multicast.ini

在 HostB 中,

目录是同一个订阅者,然后发布者这样操作:

$ ./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

我做错了什么??

【问题讨论】:

    标签: networking data-distribution-service wan opendds


    【解决方案1】:

    我对同样的问题感兴趣。我想从 AWS 到我的应用程序进行类似的运行。

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

    【讨论】:

      【解决方案2】:

      我终于解决了我的问题 只需更改发现服务器主机并使用 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
      

      【讨论】:

        猜你喜欢
        • 2015-03-11
        • 2014-08-12
        • 1970-01-01
        • 1970-01-01
        • 2017-05-08
        • 2019-10-26
        • 2018-03-31
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多