首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用于internet的JGroups配置

用于internet的JGroups配置
EN

Stack Overflow用户
提问于 2017-03-08 22:44:36
回答 1查看 352关注 0票数 0

我已经成功地让JGroups通过不同的机器在本地网络上工作,我不能使用多播。我需要两个节点在互联网上通信的能力。将地址更改为公共地址似乎不起作用,并且需要额外的配置。我已经研究了http://www.jgroups.org/manual-3.x/html/protlist.html并设置了external_addr,但可能还有更多需要设置的内容。

如何将其设置为通过公共地址通信?

配置:

代码语言:javascript
复制
<config xmlns="urn:org:jgroups"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">

<TCP bind_port="7800"
     recv_buf_size="${tcp.recv_buf_size:130k}"
     send_buf_size="${tcp.send_buf_size:130k}"
     max_bundle_size="64K"
     sock_conn_timeout="300"
client_bind_addr="GLOBAL"
     thread_pool.min_threads="0"
     thread_pool.max_threads="20"
     thread_pool.keep_alive_time="30000"/>

<TCPPING async_discovery="true"
         initial_hosts="${jgroups.tcpping.initial_hosts:52.211.80.63[7801]}"
         port_range="2"/>
<MERGE3  min_interval="10000"
         max_interval="30000"/>
<FD_SOCK/>
<FD timeout="3000" max_tries="3" />
<VERIFY_SUSPECT timeout="1500"  />
<BARRIER />
<pbcast.NAKACK2 use_mcast_xmit="false"
               discard_delivered_msgs="true"/>
<UNICAST3 />
<pbcast.STABLE desired_avg_gossip="50000"
               max_bytes="4M"/>
<pbcast.GMS print_local_addr="true" join_timeout="2000"
            view_bundling="true"/>
<MFC max_credits="2M"
     min_threshold="0.4"/>
<FRAG2 frag_size="60K"  />
<!--RSVP resend_interval="2000" timeout="10000"/-->
<pbcast.STATE_TRANSFER/>

</config>
EN

回答 1

Stack Overflow用户

发布于 2017-03-10 14:26:54

不需要,除非您位于NAT之后,否则不需要external_addr。您需要做的是:

  • TCP.bind_addr (我建议删除TCP.client_bind_addr),例如(50.x.x.x)
  • TCPPING.initial_hosts需要拥有所有(或大多数)成员地址

的公共IP地址之一

您当前的配置不起作用,因为(1) bind_addr未定义,(2) initial_hosts在端口7801列出了一个成员,但TCP.bind_port7800

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42674346

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档