Skip to content
tomstrummer edited this page Sep 13, 2010 · 9 revisions

Database setup

You need a shared database configured between all of your Openfire servers. Ok, so you’ve done that, and built and installed the plugin. Oh yeah there’s some other stuff…

Set openfire System Properties

In the Openfire admin console, add the following System Property:

cache.clustering.clustered.class = com.enernoc.rnd.openfire.cluster.cache.ClusteredCacheFactory

BTW – that property is loaded statically, so any change won’t be applied once Openfire’s ClusterManager class loads. So restart your server(s) now.

Other available properties:
com.enernoc.clustering.jgroups.configJGroups confiuration file URL
com.enernoc.clustering.cache.configJBossCache configuration file URL

Note that these are configured to use a “local” clustering mode by default, which attempts to allow multiple servers to run on the same machine… Assuming I got the configuration right.

Startup script changes

the openfire startup script needs to be edited. The JVM should be started with the -Djava.net.preferIPv4Stack=true option. This will allow multicast to bind correctly to your IPv4 network address. See also the plugin status page for additional JVM settings.

System changes

The socket buffer limits need to be raised. You can do this by modifying /etc/sysctl.conf and adding:

#increase TCP max buffer size setable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
#increase Linux autotuning TCP buffer limits
#min, default, and max number of bytes to use
#set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

then run sysctl -p

The ulimit for the machine also needs to be increased. Edit the limits file: /etc/security/limits.conf and add this line:

*                -    nofile          32000

Finally

Now what? Start looking through all fifteen of those log files under $OPENFIRE_HOME/logs and start debugging! This plugin is a work in progress, and probably not production-quality. See the plugin status page for more info on the plugin’s current limitations. Fun times. Oh, and if you want some way to get all of those log messages to go to a single file… Too bad, it’s hard-coded! Actually, I wrote another plugin to fix that.

Clone this wiki locally