hazelcastjclouds

jclouds discovery is not working in Hazelcast 3.6 EA


I was trying to use new jclouds based discovery mechanism in Hazelcast 3.6 EA. However, couldn't make it work using exactly same credentials as for native AWS discovery. Here are two configs:

Native AWS (works):

<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 (doesn't work):

<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>

More about setup: 2 instances which are part of the same Elastic Beanstalk application. Port 5701 is open publicly (for testing). DEBUG log level enabled for Hazelcast. AWS user has permission to perform ec2:describe*

With jclouds discovery enabled, each node only see itself:

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
}

Solution

  • I see Hazelcast 3.6-EA release has issues with JClouds Integration and here is the fix for it. https://github.com/hazelcast/hazelcast/pull/6651