我试图在jclouds
3.6 EA中使用基于Hazelcast
的新发现机制。但是,无法使用与本机AWS发现完全相同的凭据来使其工作。这是两个配置:
原生AWS(可行):
<network>
<join>
<multicast enabled="false" />
<tcp-ip enabled="false" />
<aws enabled="true">
<access-key>AKIAXXXXXXXXXXXXX</access-key>
<secret-key>YYYYYYYYYYYYYYYYY</secret-key>
<region>eu-west-1</region>
<host-header>ec2.amazonaws.com</host-header>
</aws>
</join>
</network>
jclouds
(不起作用):
<properties>
<property name="hazelcast.discovery.enabled">true</property>
</properties>
<network>
<join>
<multicast enabled="false" />
<tcp-ip enabled="false" />
<aws enabled="false" />
<discovery-strategies>
<discovery-strategy class="com.hazelcast.jclouds.JCloudsDiscoveryStrategy" enabled="true">
<properties>
<property name="provider">aws-ec2</property>
<property name="identity">AKIAXXXXXXXXXXXXX</property>
<property name="credential">YYYYYYYYYYYYYYYYY</property>
<property name="regions">eu-west-1</property>
</properties>
</discovery-strategy>
</discovery-strategies>
</join>
</network>
有关安装的更多信息:2个实例,它们是同一个Elastic Beanstalk应用程序的一部分。端口5701公开(用于测试)。为Hazelcast启用DEBUG日志级别。 AWS用户有权执行ec2:describe*
启用jclouds
发现后,每个节点只能看到自己:
DEBUG: Log4jFactory.java:93 [172.31.5.117]:5701 [dev] [3.6-EA] This node will assume master role since no possible member where connected to.
DEBUG: Log4jFactory.java:93 [172.31.5.117]:5701 [dev] [3.6-EA] This node is being set as the master
DEBUG: Log4jFactory.java:93 [172.31.5.117]:5701 [dev] [3.6-EA] PostJoin master: Address[172.31.5.117]:5701, isMaster: true
INFO : Log4jFactory.java:99 [172.31.5.117]:5701 [dev] [3.6-EA]
Members [1] {
Member [172.31.5.117]:5701 this
}
答案 0 :(得分:3)
我看到Hazelcast 3.6-EA版本存在JClouds集成问题,这里有解决方法。 https://github.com/hazelcast/hazelcast/pull/6651