【发布时间】:2016-04-24 10:45:06
【问题描述】:
我有三台 aws 机器,在这些机器上我设置了三个安装了 hazelcast-3.5.4 的 docker 容器(ubuntu)。将 aws 配置设置为我通常使用 Hazelcast 所做的(没有 docker)。节点没有发现彼此。如何让他们互动或发现彼此?
Hazelcast.xml 文件如下所示:
<join>
<multicast enabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="false">
<interface>127.0.0.1</interface>
<member-list>
<member>127.0.0.1</member>
</member-list>
</tcp-ip>
<aws enabled="true">
<access-key>Some_key</access-key>
<secret-key>Secret_key</secret-key>
<!--optional, default is us-east-1 -->
<region>us-east-1</region>
<!--optional, default is ec2.amazonaws.com. If set, region shouldn't be set as it will override this property -->
<host-header>ec2.amazonaws.com</host-header>
<!-- optional, only instances belonging to this group will be discovered, default will try all running instances -->
<!--security-group-name>hazelcast-sg</security-group-name-->
<tag-key>type</tag-key>
<tag-value>hz-nodes</tag-value>
</aws>
</join>
<public-address>private-ip-of-aws-node</public-address>
<properties>
<property name="hazelcast.local.localAddress">private-ip-of-aws-node</property>
</properties>
此外,我还添加了两个条目,如某处类似帖子中所建议的那样,这似乎对我不起作用。
【问题讨论】:
-
以下是我的 hazelcast.xml 配置
-
我可以从节点 1 中的 docker 容器 ping 节点 2,反之亦然。
标签: amazon-web-services docker cloud hazelcast