Hi,
this is a very brief summary of my configuration
1. for those who can not or do not want to use multicast packets to detect the cluster and
2. for users which have a firewall between two servers and who need to specify the IP address which is used for clustering (this can not be done with conf/openfire.xml - jive.network.address)
3. for users who want to run a cluster on one physical server without the need to install software which emulates a host.
You should know how to install and configure Openfire because this is not explained here.
I have two IP addresses 192.168.3.10 (host A) and 192.168.3.11 (host B).
I bind Openfire to the IP address by editing conf/openfire.xml. If you are running on different servers this is of course not necessary.
I start Openfire on with these additional JVM parameters on host A:
-Djava.net.preferIPv4Stack=true
-Dtangosol.coherence.localhost=192.168.3.10 -Dtangosol.coherence.machineid=10
-Dtangosol.coherence.wka2=192.168.3.10 -Dtangosol.coherence.wka1=192.168.3.11
".10" and ".11" are swapped on host B.
tangosol.coherence.localhost makes sure that that also Coherence uses the same IP as Openfire. You can specify any IP address of the server there, so if you want to use one network/NIC for XMPP traffic and another network/NIC for the cluster communication you can define the cluster stuff here. And tell your firewall admin which IP and port (default 8088) you are using. (probably insert a picture here or an enterprise setup)
tangosol.coherence.machineid is probably not necessary.
tangosol.coherence.wkaN specifies the IP address of the servers in the cluster.
tangosol.coherence.wkaN.port is not used in my setup.
My lib/tangosol-coherence-override.xml file looks like:
<coherence>
<cluster-config>
<unicast-listener>
<well-known-addresses>
<socket-address id="1">
<address system-property="tangosol.coherence.wka1">host1</address>
<port system-property="tangosol.coherence.wka1.port">8088</port>
</socket-address>
<socket-address id="2">
<address system-property="tangosol.coherence.wka2">host2</address>
<port system-property="tangosol.coherence.wka2.port">8088</port>
</socket-address>
</well-known-addresses>
</unicast-listener>
</cluster-config>
</coherence>
One can add more entries for more cluster nodes.
I hope that this helps users which have problem with multicast setups and one may want to edit this document to become a more detailed and generic one.
I believe you can do that in the Admin Console > Server > System Properties, however I have not discovered to where these properties are written. I would think it would be $HOME/conf/openfire.xml but after adding a property, I do not see any updates.
hey thanks for your response, i added the above JVM parameters to my properties but im unsure if it worked, as i did not find any updates in files like you mentioned. I did not see any difference in my clustering behavior also.
System properties are stored in the sql db table jiveSoftware. Changes persist, but I used meaningless dummy data. Did you try restarting? Maybe they are only read at startup?
cool i see. Yes i see the cluster in my overview. Just i later found out multi cast packets are now allowed in the network so it appeared there anyway. Hard to know if the above setup is working.
Where or how do you add the additional JVM parameters if you are not running openfire through an IDE like Eclipse?
best
Mark