powered by Jive Software

How to cluster Openfire servers?

Ok, so basically i would like to know how to cluster servers. Now before anyone recommends me the plugin that is official in Openfire and uses Oracle Coherence or the other “open-clustering” plugin, i’ll say that i have tried them out and they are not working for me (i am using Openfire 3.7.0).

Basically i would like to achive a goal if one machine drops offline, then another machine can still keep going and users in the server won’t notice the difference. I understand that there is a load balancer needed and most likely a separate database, but could it also be possible to have the same database on each of the cluster servers and the databases would be kept in sync? If thats possible, how to do that?

But first of all i guess a working clustering plugin is needed.

If any of you has another idea about how to achive a goal on how to avoid downtime by having multiple Openfire servers with the same databases etc, then please do tell.

Thanks in advance.

If you dig around the discussions a little someone posted an updated clustering plugin for 3.7.0, as well as the jar files for Coherence 3.3.1 (3.4 and above are not supported with Openfire). You can get the clustering working with 3.7.0 without too many headaches.

I backend Openfire with Oracle RAC, which has multiple front-end database servers with shared backend storage. You can probably setup an active/passive database configuration with shared storage using most database platforms.

Even with the clustering plugin and a redundant database, when the Openfire server goes down any users on it will have to reconnect to other servers available in the cluster. Depending what your SLA is, you can probably get away with running a service clustering environment and just restarting Openfire on another box when it goes down. Everyone will have to reconnect, but it’s less work than clustering the whole app and running a load balancer.

Thank you for the information. Although i did find the Oracle Coherence 3.3.1, 3 jar files which were updated and i used them. Also i tried several different clustering plugins i found. All options failed. If you would be so kind and actually provide links to your claims, it would help me out a lot. For example a link to the clustering plugin you used and to Oracle Coherence files, i used these here and it still did not work.

Here you go.

http://community.igniterealtime.org/message/211437#211437

http://community.igniterealtime.org/message/213184#213184

Unfortunently doing that gave me same errors as before, here is what the beginning of the error message looks like:

2011-09-25 20:27:33.836 Oracle Coherence 3.3.1/389 (thread=pool-8-thread-1, member=n/a): Loaded operational configuration from resource “jar:file:/C:/OTHER%20SERVERS/Openfire/Openfire/lib/coherence.jar!/tangosol-coh erence.xml”

2011-09-25 20:27:33.838 Oracle Coherence 3.3.1/389 (thread=pool-8-thread-1, member=n/a): Loaded operational overrides from resource “jar:file:/C:/OTHER%20SERVERS/Openfire/Openfire/lib/coherence.jar!/tangosol-coh erence-override-dev.xml”

2011-09-25 20:27:33.839 Oracle Coherence 3.3.1/389 (thread=pool-8-thread-1, member=n/a): Optional configuration override “/tangosol-coherence-override.xml” is not specified

I have got the same error message before with the original version of this plugin.

When i log in to admin panel, i see a white blank page with the same error message in there and the server is not functioning.

My implementation has the same log entries, but it works - I’m running it on Linux, not Windows. Is that the last thing logged?

These are the first lines logged, rest of it seems to be something about Oracle Coherence and seems not that useful.

Post the whole thing or put it on pastebin - There is probably an actual error somewhere. Maybe post your error.log and/or debug.log.

Here are both the Openfire Admin Panel Error log and the log what shows up when logged into admin panel:

http://pastebin.com/p7AJPwG7

You replaced the clustering.jar with the one I attached earlier, and deleted the ‘clustering’ directory from ‘plugins’ so it will unpack the new jar next time it is restarted?

Yes, i removed everything about the previous clustering plugin, basically did the clean install, step-by-step from the two links you gave me.

Shoot me a private message and I’ll send you a zip of my openfire installation. I seem to recall the backtrace you are seeing when I was originally working on the clustering configuration, but don’t recall specifically what I did to work around it.

His installation worked. Basically it seems i did something wrong. Anyway solution is this:

First you need to extract Oracle Coherence files v3.3.1 founded at http://community.igniterealtime.org/message/213130#213130 and extract them to Openfire root /lib folder.

Then get the updated clustering plugin from this location http://community.igniterealtime.org/message/211434#211434 upload the “clustering.jar” to plugins folder, start openfire and then stop openfire. Get files from “clustering_src.zip” and extract-overwrite them to the plugins folder “clustering”.

Start Openfire again and it should work. You will see some errors, but it seems they wont disturb anything.

1 Like

Hello,

I’ve followed your steps above, however, it doesn’t work to me.

I always get this error when open user-summary tab

HTTP ERROR 500

Problem accessing /user-summary.jsp. Reason:

org.jivesoftware.util.cache.DefaultCache cannot be cast to com.jivesoftware.util.cache.ClusteredCache

then I restarted openfire and could not login to admin page again. I always get

java.lang.ExceptionInInitializerError

at org.jivesoftware.openfire.lockout.LockOutManager.getInstance(LockOutManager.jav a:73)

at org.jivesoftware.openfire.auth.AuthFactory.authenticate(AuthFactory.java:172)

at org.jivesoftware.openfire.admin.login_jsp._jspService(login_jsp.java:149)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

Any suggestions?

BTW, I ran OpenFire 3.7.1 on windows 7.

Thank you.

I’m afraid in 3.7.1 the clustering plugin does not work anymore. At least i haven’t found a way to make it work. I would recommend you to try eJabbered XMPP server, they have more developers etc. I love Openfire, but unfortunently i can’t contribute any developing support to it. Hopefully something happens and it gets better over time. Altho it has only 1 developer so things don’t look good, better to try or look more alternatives if you are using XMPP in your buisness and it’s very important there. (Yes i know that plugins have different developers etc, just saying)

Hi,

I have problem to open the link http://community.igniterealtime.org/message/213130#213130 to get the Oracle coherence 3.3 jar files to support OpenFire 3.7.1 Clustering. I cannot download Coherence 3.3 from Oracle site, they don’t support it anymore.

I go the “Unauthorized” page when I clicked this link.

Any clue.

Thanks,

Frank

I am pretty sure that it is blocked because coherence is not open source so ignite should not be distributing it. It was posted to the forum by a user, and probably never should have been.

You could also try using Hazelcast (OSS) with a nightly build. It was just added in recently and will give a completely free solution (with regards to clustering).