powered by Jive Software

2 node Hazelcast Cluster EC2

Hi all,

at the moment i try to configure a 2 node Cluster with Openfire 3.8.2 and the latest hazelcast Plugin. I’ve configured that on a Amazons EC2.

(Using Suse 11 SP3 x86)

My problem is that the cluster won’t run. I setup several times without success.

Eeach Server recordnigzes hisself as a cluster configuration. But just showing 1 machine on the Web-Gui!(No cluster joined)

I opend this ports for outgoing Conncetions on both machines!

  • 22 (SSH)
  • 3478
  • 3479
  • 5222
  • 5701
  • 7070
  • 7443
  • 7777
  • 9090
  • 9091
    DNS resolution works properly for public and private adresses between 2 the nodes.

I’m not sure if it’s a problem withe the XML Config or Security Config on EC2.

I’ve also tried using instead of

I’ve tried several (as shown in hazelcast Docs) configurations but no success.

Each time i start the Cluster on Node1 i get this message:

Jan 12, 2014 12:55:00 PM com.hazelcast.config.ClasspathXmlConfig

INFO: Configuring Hazelcast from ‘hazelcast-cache-config.xml’.

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

INFO: Resolving domain name ‘ip-172-31-xy-abc.region.compute.internal’ to address(es): [172.31.xy.abc]

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

INFO: Resolving domain name ‘ip-172-31-zy-def.region.compute.internal’ to address(es): [172.31.zy.def]

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

INFO: ‘ec2-54-ab.xyz.region.compute.amazonaws.com’ is not an IP address! Removing from interface list.

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

INFO: Interfaces is enabled, trying to pick one address matching to one of: []

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

INFO: Prefer IPv4 stack is true.

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

SCHWERWIEGEND: Hazelcast CANNOT start on this node. No matching network interface found.

Interface matching must be either disabled or updated in the hazelcast.xml config file.

Jan 12, 2014 12:55:00 PM com.hazelcast.impl.AddressPicker

SCHWERWIEGEND: Hazelcast CANNOT start on this node. No matching network interface found.

Interface matching must be either disabled or updated in the hazelcast.xml config file.

java.lang.RuntimeException: Hazelcast CANNOT start on this node. No matching network interface found.

Interface matching must be either disabled or updated in the hazelcast.xml config file.

at com.hazelcast.impl.AddressPicker.pickAddress(AddressPicker.java:147)

at com.hazelcast.impl.AddressPicker.pickAddress(AddressPicker.java:51)

at com.hazelcast.impl.Node.(Node.java:144)

at com.hazelcast.impl.FactoryImpl.(FactoryImpl.java:386)

at com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy(FactoryImpl.java:133)

at com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy(FactoryImpl.java:125)

at com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy(FactoryImpl.java:104)

at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:507)

at com.jivesoftware.util.cache.ClusteredCacheFactory.startCluster(ClusteredCacheFa ctory.java:130)

at org.jivesoftware.util.cache.CacheFactory.startClustering(CacheFactory.java:639)

at org.jivesoftware.openfire.cluster.ClusterManager.startup(ClusterManager.java:28 5)

at com.jivesoftware.openfire.HazelcastPlugin.run(HazelcastPlugin.java:75)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482)

at java.util.concurrent.FutureTask.run(FutureTask.java:273)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)

at java.lang.Thread.run(Thread.java:804)

Server halted

XML of Node 1.

openfire

openfire

5701

224.2.2.3

54327

ip-172-31-xy-abc.region.compute.internal:5701(Privat DNS of the machine)

ip-172-31-zy-def.region.compute.internal:5701(Privat DNS of the other machine)

ip-172-31-xy-abc.region.compute.internal:5701(Privat DNS of the machine)

XML Config on Node 2:

openfire

openfire

5701

224.2.2.3

54327

ip-172-31-xy-abc.region.compute.internal:5701

ip-172-31-zy-def.region.compute.internal:5701

ip-172-31-zy-def.region.compute.internal

Thank you for your help.

Maybe use IP addresses instead of the DNS names with :

192.168.1.84:5701

192.168.1.85:5701

192.168.1.84

these are just example IP addresses, you will need to get the correct ones from the AWS console.

Each OpenFire instance needs to connect to your mysql instance with correct securty group setting.

Thanks for your reply.

I’ve tried that already. I used the internal AWS DNS Names also with the Tag. Nothing.

Each Server is connected to the remote mysql Database (RDS). I see the same useres on both machines, that works fine.

I will try to configure it on my localhost…so i can see if its a problem with AWS or a config problem.

There is a perfect documentation from Hazelcast - AWS/Best Practices for Deployment. I followed the Documentation and everthing works fine.

Thanks

Hi Django,

Great that you got the cluster running. Thanks for the HazelCast AWS best practices doc, I hadn’t seen that before. I have a OpenFire cluster running on AWS with IP addresses like outlined above. One trick is to set the OF “server name” to a domain name that both cluster nodes have configured like chat.mydomain.com and the OF “host name” is the actual AWS server name.

Are you using the HazelCast EC2 autodiscovery configuration?

<aws enabled="true">

Hello Mike,

i’ve configured it with the EC2 autodiscovery, but i didn’t run out of the box. Both machines could resolve eacht other and i see that the they try to communicate but the connection got lost. I think that was a issue with the “auto port increase” or something. i thing its possible to run it with aws autodiscovery config, but the normal configuration with the IP Adresses was enough for me(for the first step). I will work on that problem if i decide to use openfire.it looks good so far :slight_smile: .

By the way, your hint was correct to use the IP Adress instead of DNS. But i had an other problem a this time, so it doesn’t solved my problem. No it works!

Thank’s