Clustering Plugin ver 1.2.2 (Coherence replaced with Shoal)

Purpose

To provide a complete open source clustering plugin for Openfire with no dependecies on Oracle Coherence or any other closed component


Overview

The clustering plugin adds support for running multiple redundant Openfire servers together in a cluster. By running Openfire in a cluster, you can distribute the load amongst a number of servers, as well as having some form of redundency in the event that one of your servers dies.


Installation

Copy clustering.war into the plugins directory of your Openfire installation. The plugin will then be automatically deployed.


Configuration

To enable clustering or monitor the cluster go to: Server --> Server Manager --> Clustering


Shoal configuration paramters that can be changed from system properties are

Parameter
Default Value
xmpp.server.clustering.loopback
true
xmpp.server.clustering.multicastaddress
229.9.1.1
xmpp.server.clustering.multicastport
2299
xmpp.server.clustering.is.bootstrapping.node
true
xmpp.server.clustering.virtual.multicast.uri.list
tcp://server_hostname:5200

Shaol requires at least one node to be designated as the bootstrap node. The IP address or hostname of this node should be made available to all nodes with the xmpp.server.clustering.virtual.multicast.uri.list parameter. For this node, set xmpp.server.clustering.is.bootstrapping.node to “true” and for all other nodes “false”

Example, 2 nodes A (192.168.1.21) and B (192.168.1.22). A is to be the bootstrap node

Parameter
A
B
xmpp.server.clustering.loopback
true
true
xmpp.server.clustering.multicastaddress
229.9.1.1
229.9.1.1
xmpp.server.clustering.multicastport
2299
2299
xmpp.server.clustering.is.bootstrapping.node
true
false
xmpp.server.clustering.virtual.multicast.uri.list
tcp://192.168.1.21:5200
tcp://192.168.1.21:5200

For more details see http://wikis.sun.com/display/shoal/Shoal+How-To+-+Configuring+for+cross+subnet+s upport

For latest version and source code go to http://code.google.com/p/open-clustering/

Thanks for post.

I have been configued but not successfull!

Node A: telnet localhost 5200, telnet localhost 2299. Result is both “Connection refused”

Log in stderror.log on node A:

com.sun.enterprise.mgmt.transport.grizzly.GrizzlyTCPConnectorWrapper$CloseContro lCallbackHandler onConnect

SEVERE: Connection refused

additional: when disable, enable clustering has error: the property xmpp.server.clustering.is.bootstrapping.node auto update false or true

please help.

Thanks.

Shoal unicast (TCP) does not seem to be working. It has been removed. See

http://code.google.com/p/open-clustering/

Hello Dele.

Thanks for your reply.

I use openfire 3.7.0

I have been removed xmpp.server.clustering.virtual.multicast.uri.list property. Only use 4 property:

xmpp.server.clustering.is.bootstrapping.node true (node A; node B is false)

xmpp.server.clustering.loopback true

xmpp.server.clustering.multicastaddress 229.9.1.1

xmpp.server.clustering.multicastport 2299

But has exception:

com.sun.enterprise.mgmt.transport.grizzly.GrizzlyTCPConnectorWrapper$CloseContro lCallbackHandler onConnect

SEVERE: Connection refused

need more help pls.

Please use latest version at

http://code.google.com/p/open-clustering/

Please use latest version at

http://code.google.com/p/open-clustering/

Hello Dele.

I don’nt find any change on code.google

Hey Dele,

I am unable to create a cluster using this plugin. I guess the properties are being saved in the common database. This makes **xmpp.server.clustering.is.bootstrapping.node **to take same value across all servers. So, either all nodes become bootstrapping nodes or no node become bootstrapping node. Moreover I tried to telnet to port no 5200 of machine with **xmpp.server.clustering.is.bootstrapping.node=true **but no success. Please help…!

1 Like

Hi Dele,

I haven’t seen any responses for the previous few commenters, and I’m stuck at the same spot. The crux of the problem seems to be that, because each node in the cluster shares the same database, and that’s where the configuration properties are stored, we currently have no way to set xmpp.server.clustering.is.bootstrapping.node differently on each node. This means all nodes in the cluster are either bootstrapping nodes, or none of them are.

Please help! It sounds like quite a few of us are having the same issue.

Thanks in advance,

Dan.

Hi Dele,

I use openfire 3.6.4 , and open-clustering source code in http://open-clustering.googlecode.com/svn/trunk/http://open-clustering.googlecode.com/svn/trunk/ , I build the open-clustering ,I got clustering.war .

I use 4 property:

xmpp.server.clustering.is.bootstrapping.node true

xmpp.server.clustering.loopback true

xmpp.server.clustering.multicastaddress 229.9.1.1

xmpp.server.clustering.multicastport 2299

I found that send and receive messages loop continually

When I log on a client, Eventually lead to memory overflow.

Then I modified the method "doClusterTask(ClusterTask task, byte[] nodeID) " in the class com.jivesoftware.util.cache.CoherenceClusteredCacheFactory,

that is :

change code line “groupHandle.sendMessage( “OpenFire”, serializeTask(sct));” to

“groupHandle.sendMessage(new String(nodeID), “OpenFire”,serializeTask(sct));”

I also modified the method “doSynchronousClusterTask(ClusterTask task, byte[] nodeID)” ,

change code line “groupHandle.sendMessage(“OpenFire”,serializeTask(sct));” to

groupHandle.sendMessage(new String(nodeID),“OpenFire”,serializeTask(sct));"

and modified the method “updateCacheStats(Map<String, Cache> caches)”

added code :

for(Cache cache:CacheFactory.getAllCaches())
{
Log.info("Migrating "+cache.getName());
CacheWrapper cacheWrapper = (CacheWrapper)cache;
Cache c = new ShoalClusteredCache(this, cache.getName());

for(Object o:cacheWrapper.keySet())
{
Log.debug(cache.getName() + " : putting “+cache.get(o) +” at key "+o);
c.put(o, cache.get(o));
}

cacheWrapper.setWrappedCache©;
Log.info("Done migrating "+cache.getName());

}

finally,the openfire clustering running Successfully!

but the File transfer instability,Do you see What problems about file transfer ?

thanks!

Hi Dele,

I am unable to find the above mentioned link i.e. http://wikis.sun.com/display/shoal/Shoal+How-To±+Configuring+for+cross+subnet+s upport

Can anyone here please share the details

Thanks in advance !

Rakesh