Two issues with Openfire Hazelcast on Amazon AWS EC2

I have several issues trying to set up a Openfire cluster on Amazon AWS. I am running Openfire 4.0.2 with the Hazelcast 2.2.0 plugin on two ubuntu instances.

Issue #1 Clustering: My instances form seperate clusters on each server containing only one node.

I have tried calling aws ec2 describe-instances in the AWS-CLI and I discovered all instances, however hazelcast doesn’t seem to find any.

hazelcast-cache-config.xml:

224.2.2.3

54327

***************

*

ec2.amazonaws.com

type

hz-members

Logs:

2016.09.14 10:58:07 org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory - No cluster members selected for cluster task org.jivesoftware.openfire.session.GetSessionsCountTask

2016.09.14 10:59:16 org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory - No cluster members selected for cluster task org.jivesoftware.util.PropertyClusterEventTask

2016.09.14 11:21:52 com.hazelcast.cluster.impl.TcpIpJoinerOverAWS - [...]:5701 [openfire] [3.5.1] No EC2 instances found!

Info Logs:

2016.09.14 11:32:48 com.hazelcast.instance.DefaultAddressPicker - [LOCAL] [openfire] [3.5.1] Prefer IPv4 stack is true.

2016.09.14 11:32:48 com.hazelcast.instance.DefaultAddressPicker - [LOCAL] [openfire] [3.5.1] Picked Address[172.31..]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true

2016.09.14 11:32:49 com.hazelcast.spi.OperationService - [172.31..]:5701 [openfire] [3.5.1] Backpressure is disabled

2016.09.14 11:32:49 com.hazelcast.spi.impl.operationexecutor.classic.ClassicOperationExecutor - [172.31..]:5701 [openfire] [3.5.1] Starting with 2 generic operation threads and 2 partition operation threads.

2016.09.14 11:32:50 com.hazelcast.system - [172.31..]:5701 [openfire] [3.5.1] Hazelcast 3.5.2 (20150826 - ba8dbba) starting at Address[172.31..]:5701

2016.09.14 11:32:50 com.hazelcast.system - [172.31..]:5701 [openfire] [3.5.1] Copyright © 2008-2015, Hazelcast, Inc. All Rights Reserved.

2016.09.14 11:32:50 com.hazelcast.instance.Node - [172.31..]:5701 [openfire] [3.5.1] Creating AWSJoiner

2016.09.14 11:32:50 com.hazelcast.core.LifecycleService - [172.31..]:5701 [openfire] [3.5.1] Address[172.31..]:5701 is STARTING

2016.09.14 11:32:51 com.hazelcast.cluster.impl.TcpIpJoinerOverAWS - [172.31..]:5701 [openfire] [3.5.1]

Members [1] {

Member [172.31..]:5701 this

}

2016.09.14 11:32:51 com.hazelcast.core.LifecycleService - [172.31..]:5701 [openfire] [3.5.1] Address[172.31..]:5701 is STARTED

2016.09.14 11:32:51 com.hazelcast.partition.InternalPartitionService - [172.31..]:5701 [openfire] [3.5.1] Initializing cluster partition table first arrangement…

2016.09.14 11:32:51 org.jivesoftware.util.cache.CacheFactory - Clustering started; cache migration complete

2016.09.14 11:32:52 org.jivesoftware.openfire.plugin.util.cache.ClusterListener - Joined cluster as node: 56889eeb-5fdd-4cb2-a001-c8c3e99b0b4d. Senior Member: YES

2016.09.14 11:33:55 org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory] for Locked Out Accounts

Issue #2 Sessions: As soon as my Load Balancer register the second instance as ‘InService’ my Strophe JS client start getting connection issues:

I am not sure if this error can be solved by modifying the Openfire configuration or that I have to change something in my XMPP client.

strophe.js:4771 POST http://chat.*.com:7070/http-bind/ 404 (Invalid SID value.)

Logs:

2016.09.14 11:24:12 org.jivesoftware.openfire.http.HttpBindServlet - Client provided invalid session: 3x8s6wet2w. [...]