powered by Jive Software

Enable clustering upon openfire startup

First, many thanks to the people who put together the hazelcast plugin.

I am deploying openfire 3.8.1 to AWS and I want to auto-deploy the hazelcast.jar plugin. I have modified the hazelcast.jar to remove the classes/hazelcast-cache-config.xml as I don’t want this created when the plugin is restarted through the admin console. I have also packed the hazelcast-cloud-2.5.jar to get the AWS aware feature working and placed that in the lib folder of the exploded plugin. The reason I put the hazelcast-cloud-2.5.jar into the hazelcast.jar is because it gets wiped out if you click on the “restart” icon for the plugin in the Admin interface. By including it in the plugin it remains if someone does that. Then I re-jarred this all back to a new hazelcast.jar. During the installation I am placing the modified hazelcast.jar in the plugins directory. I am also placing a hazelcast-cache-config.xml file in the openfire_home/conf directory. This all works pretty good with a couple of exceptions:

a) The clustering is not enabled by default. I need the clustering enabled by default. I do not want to go to the Admin page and enable clustering manually. Is there way to enable clustering by default? I am willing to use any api or curl/wget commands if needed.

b) The first time I enable clustering it hangs after clicking Submit. I then need to restart the openfire service and it works from there on. If anybody has seen this please let me know. Otherwise I will test using a tcp-ip enabled cluster with the downloaded plugin without modifications to see if that is my problem.

Any thoughts are welcome.

Thanks

I found out the answer. It appears that after enabling the clustering through the admin interface it just updates the openfire.xml config file with

<jive>
  ...
  <clustering>
    <enabled>true</enabled>
  <clustering>
  ...
</jive>

Adding that to my openfire.xml config file before starting openfire solved both my issues.