powered by Jive Software

Clustering on OpenFire 3.7.1

I’ve been trying to cluster openfire 3.7.1 servers on both windows using clustering 1.2.1_beta plugin and coherence 3.3.1. Unfortunately, I couldn’t make it work. I’ve also tried on linux platform, but it didn’t work as well.

I get the following error when browse user-summary page

HTTP ERROR 500

Problem accessing /user-summary.jsp. Reason:

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

Caused by:

java.lang.ClassCastException: org.jivesoftware.util.cache.DefaultCache cannot be cast to com.jivesoftware.util.cache.ClusteredCache at com.jivesoftware.util.cache.CoherenceClusteredCacheFactory.getLock(CoherenceClu steredCacheFactory.java:392) at org.jivesoftware.util.cache.CacheFactory.getLock(CacheFactory.java:378) at org.jivesoftware.openfire.spi.PresenceManagerImpl.loadOfflinePresence(PresenceM anagerImpl.java:551) at org.jivesoftware.openfire.spi.PresenceManagerImpl.getLastActivity(PresenceManag erImpl.java:177) at org.jivesoftware.openfire.admin.user_002dsummary_jsp._jspService(user_002dsumma ry_jsp.java:369) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164) a t org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494) at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:182) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 3) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362) a t org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 ) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:245) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConne ction.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:541) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Unknown Source)

and always get the error below after restarting openfire

Exception:

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) a t org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164) a t org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494) at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:182) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 3) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362) a t org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 ) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:245) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.j ava:1007) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Unknown Source)Caused by: java.lang.IllegalStateException: Unable to access backing cache for Locked Out Accounts. BackingMapManager is a com.tangosol.net.DefaultConfigurableCacheFactory$Manager and backing map is com.tangosol.net.cache.LocalCache at com.jivesoftware.util.cache.ClusteredCache.init(ClusteredCache.java:129) at com.jivesoftware.util.cache.ClusteredCache.(ClusteredCache.java:78) at com.jivesoftware.util.cache.CoherenceClusteredCacheFactory.createCache(Coherenc eClusteredCacheFactory.java:209) at org.jivesoftware.util.cache.CacheFactory.createCache(CacheFactory.java:346) at org.jivesoftware.openfire.lockout.LockOutManager.(LockOutManager.java:85) a t org.jivesoftware.openfire.lockout.LockOutManager.(LockOutManager.java:46) a t org.jivesoftware.openfire.lockout.LockOutManager$LockOutManagerContainer.(LockO utManager.java:52) … 37 more

Anybody can make clustering on OpenFire 3.7.1 work?

Any suggestion/advice would be appreciated.

Thank you.

I’m with you, albus.

I’m using clustering plugin 1.2.0 and keep getting the second exception when enabling the clustering via the console and upon restarting the server.

I’m helpless.

Eitan

I tried clustering 1.2.0 and open-clustering 0.1.2.2 with 3.7.1 and both have problems,

clustering 1.2.0 has “Problem accessing /user-summary.jsp” like “albus” reported.

I dont have the 2nd error restarting the server like you have.

open-clustering has this problem reported “http://code.google.com/p/open-clustering/issues/detail?id=1

Im using 2 nodes, each with its own database…do the clusters need to connect to the same database?

Ok, i managed to get it working in both 3.7.0 and 3.7.1

Im using these files:

clustering plugin (beta 1.2.1) for openfire 3.7.0

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

Oracle coherence 3.3 jar files for openfire 3.7.0

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

  • clustering.jar put inside openfire plugins dir

  • Oracle coherence jars put inside openfire lib dir

** **- locate coherence-cache-config.xml inside the clustering.jar

and put it inside coherence.jar (replacing the default one)

  • make sure all servers that are being clustered connect to the same external database (same xmpp domain)

  • start the servers

Hi,

I’ve manged to run clustering on OpenFire 3.7.0.

Here are my steps:

Installing OpenFire with clustering on Ubuntu

  1. tar -zxvf openfire_3_7_0.tar.gz

  2. Copy the 3 cohernce 3.3.1 jars into the openfire lib folder: coherence.jar, coherence-work.jar, tangosol.jar

  3. Remove coherence-cache-config.xml from coherence.jar

  4. Create logs directory under root with full permissions to all.
    Create the following empty files: error.log, warn.log, info.log, debug.log

  5. Run openfire: bin/openfire. Verfy nohup.out has no errors.

  6. Run admin console and setup.
    In the Server Settings page, choose the same domain name for all servers in the cluster.
    Skip the admin user setting page. The default is admin/admin. Changing the defaults might cause problems on login. You may get problems to login anyway.

  7. copy clustering plugin (clustering.jar) version 1.2.1-beta into plugins directory.
    Wait for the clustering folder be created under the plugins directory.
    The plugin name should also appear in the Plugins tab at the console.

  8. After the clustering plugin is installed by OpenFire server, go to plugins/clustering folder and copy from plugin/clustering/lib folder:
    plugin-clustering.jar into OpenFire lib folder.
    If this jar is missing an error “Failed to start or join an existing cluster.” will appear in the Console when enabling the clustering.
    The following exception appears in /logs/error.log: java.lang.ClassNotFoundException: com.jivesoftware.util.cache.JiveConfigurableCacheFactory

coherence-cache-config.xml into OpenFire lib folder. ( Coud not find why this is important ).
There is a post saying this xml should be inserted into coherence.jar

tangosol-coherence-override.xm into root folder. You need root permissions for this.
If this file is missig, other nodes in the cluster will not appear in Cluster Overview in the Console, only this node )

  1. Restart the server. To load clustering.jar from the lib folder.

  2. Initiate the clustering in the console on the server tab clustering entry at the left.
    Select the Enable radio button. after 30 secs a green message appears: “Clustering was enabled successfully”.
    In the Clustering View pane you see all nodes in the cluster.

Note: When using plugin 1.2.0
1: You can not Disable clustering

  1. the following execption may appear when going to Users/Group tab in the console:

Problem accessing /user-summary.jsp. Reason:

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

Caused by:

java.lang.ClassCastException: org.jivesoftware.util.cache.DefaultCache cannot be cast to com.jivesoftware.util.cache.ClusteredCache
at com.jivesoftware.util.cache.CoherenceClusteredCacheFactory.getLock(CoherenceClu steredCacheFactory.java:351)
at org.jivesoftware.util.cache.CacheFactory.getLock(CacheFactory.java:378)
at org.jivesoftware.openfire.spi.PresenceManagerImpl.loadOfflinePresence(PresenceM anagerImpl.java:551)
at org.jivesoftware.openfire.spi.PresenceManagerImpl.getLastActivity(PresenceManag erImpl.java:177)
at org.jivesoftware.openfire.admin.user_002dsummary_jsp._jspService(user_002dsumma ry_jsp.java:369)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)
at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:182)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 3)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 )
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:245)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:334)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConne ction.java:992)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:541)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Thread.java:662)

Hi,

Openfire3.7.1 (Linux) is working fine with Connection Manager and withoutConnection Manager.

Just I have started exploring on Clustering Plug-in and would like to know what type of clustering this plugin support. Load balance clustering?

  • To create the cluster environment:

a) I have to install Openfire3.7.1 in another linuxbox (ServerB) with same domain name.

b) Do I need to copy the 3 coherence 3.3.1 jars(coherence.jar, coherence-work.jar, tangosol.jar) and plugin-clustering.jar into the openfire lib folder for both servers (ServerA and ServerB) or ServerA only or ServerB only?

Thanks,

Yes, both servers need identical openfire installations, with the coherence jar files and the clustering plugin. They both also need to connect to the same database.

You will also need an external mechanism, such as a load balancer, to route users to each of the systems. You could probably use SRV records to do this too, but I am not sure how reliable it is. The clustering plugin itself simply allows two openfire servers to behave as one environment - It does not distribute workload itself.

Do both servers have to have the same name? Is that why when i install the cluster plugin and enable it , it then renames the other servername the same as the one is just enabled it on? I dont know if i have clustering working. I can only see 1 server in my cluster list and if i try to restart the openfire service i get tons of errors. I have OF 3.7.1 on WIN2K8R2 on two separate servers with an external db with coherence.jar, -work.jar and tangosol.jar in the openfire lib. I cant seem to get these servers communicating correctly while keeping a stable environment. Has anyone been able to get Clustering Plugin working on OpenFire 3.7.1?

I’ve never tried Openfire on Windows, but on Linux the hostnames need to be different and it doesn’t ‘change’ anything when it clusters the app. Did you try to start one at a time and verifying that the hostname in the cluster info table matches the name of the box it is running on.

I’m assuming you’re running Coherence 3.3, since you mention tangosol.jar - Did you copy the xml config files out of the plugin directory into openfire\lib as explained in the above links?

Yeah both server names are different and i am running 3.3 and i copied the xml int the /lib dir. Still breaking after service restart and cant see other openfire server. Can someone layout the full install steps for a win server i just want to get this thing up and running .

Thanks

Can you paste your errors (ideally nohup.out) into pastie.org or something? Might be a simple problem.

You have windows firewall disabled, right?

I am having two sets of errors on reboot of OF service after clustering has been enabled. The first is I cant log into the admin console.

Exception:

java.lang.NoClassDefFoundError: Could not initialize class org.jivesoftware.openfire.lockout.LockOutManager$LockOutManagerContainer

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)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)

at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:182)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 3)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 )

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:245)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)

at org.eclipse.jetty.server.Server.handle(Server.java:334)

at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)

at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.j ava:1007)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209)

at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62)

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)

at java.lang.Thread.run(Unknown Source)

The second is the error log

2012.02.16 09:05:53 org.jivesoftware.openfire.cluster.ClusterManager - Unable to access backing cache for Routing User Sessions. BackingMapManager is a com.tangosol.net.DefaultConfigurableCacheFactory$Manager and backing map is com.tangosol.net.cache.LocalCache

java.lang.IllegalStateException: Unable to access backing cache for Routing User Sessions. BackingMapManager is a com.tangosol.net.DefaultConfigurableCacheFactory$Manager and backing map is com.tangosol.net.cache.LocalCache

at com.jivesoftware.util.cache.ClusteredCache.init(ClusteredCache.java:106)

at com.jivesoftware.util.cache.ClusteredCache.(ClusteredCache.java:59)

at com.jivesoftware.util.cache.CoherenceClusteredCacheFactory.createCache(Coherenc eClusteredCacheFactory.java:177)

at org.jivesoftware.util.cache.CacheFactory.joinedCluster(CacheFactory.java:674)

at org.jivesoftware.openfire.cluster.ClusterManager$1.run(ClusterManager.java:61)

Hey @tropicaldev , what do you mean you

"- locate coherence-cache-config.xml inside the clustering.jar

and put it inside coherence.jar (replacing the default one)"

Do you open the clustering.jar with a tool and edit it somehow?

Use the ‘jar’ command from a JDK to expand it, replace the file, then bundle it back up again.

What is a good tool to expand and bundle it back up? Can you upload the clustering.jar with the locate coherence-cache-config.xml in it? When the clustering.jar has that coherence-cache-config.xml it should work correctly? Will the admin console still be broken by java when i replace the coherence-cache-config.xml and restart the service ?

I’ve followed these instructions for a 2-node cluster on Windows and they basically work.

If things seem to be working except that the nodes don’t join the same cluster, it’s probably because they can’t reach each other via IP multicast. In my case that meant plugging one machine into a different network port to ensure both were on the same subnet. If you don’t know whether IP multicast is enabled for your network or what restrictions apply, consult your IT folks.

I **still **see the ClassCastException when navigating to the Users/Groups tab. So far I don’t know of a fix/workaround for that.

Well sir i have installed the Openfire 3.7.0 after removing the 3.7.1 installation of openfire server…

and the clustering is working now…

and tell me what will the procedure to create the another slave node in the openfire cluster ???

as even after not adding a single node i am seein 4 instaces of the Server…so is it with the same IP Address…i am trying to attach an screenshot but it gives me an error

So please help for the same

Hi,

Earlier I followed the same Eitan provided steps to enable the clustering-1.2.1 and was able to work successfully. But today when I enabled the clustering from admin console the 2 nodes are not appearing as part of clustering in the Cluster Overview. Only one node is appearing in Cluster overview from each admin console. I verified whether the IP Multicast is enabled or not on 2 node machines, it is enabled.

Please let me know how to bring back these 2 nodes into clustering again.

Thanks,

Did you try shutting it all down and restarting it, leaving clustering enabled before you do so? Coherence will log into nohup.out, so you can see what it is doing there.

David,

Please see the logs into nohup.out:

Node 1:

=====

log4j:WARN No appenders could be found for logger (org.jivesoftware.util.log.util.CommonsLogFactory).

log4j:WARN Please initialize the log4j system properly.

Openfire 3.7.1 [Jun 18, 2012 6:23:23 AM]

Admin console listening at:

http://usclssoat287:9090

https://usclssoat287:9091

Starting Clustering Plugin

Starting Class Loader…

Starting to join Cluster…

2012-06-18 06:23:25.149 Oracle Coherence 3.3.1/389 (thread=pool-11-thread-1, member=n/a): Loaded operational configuration from resource “jar:file:/opt/openfire/lib/coherence.jar!/tangosol-coherence.xml”

2012-06-18 06:23:25.155 Oracle Coherence 3.3.1/389 (thread=pool-11-thread-1, member=n/a): Loaded operational overrides from resource “jar:file:/opt/openfire/lib/coherence.jar!/tangosol-coherence-override-dev.xml”

2012-06-18 06:23:25.156 Oracle Coherence 3.3.1/389 (thread=pool-11-thread-1, member=n/a): Loaded operational overrides from file “/tangosol-coherence-override.xml”

Oracle Coherence Version 3.3.1/389

Grid Edition: Development mode

Copyright © 2000-2007 Oracle. All rights reserved.

2012-06-18 06:23:25.465 Oracle Coherence GE 3.3.1/389 (thread=pool-11-thread-1, member=n/a): UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 178 packets (262144 bytes). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.

2012-06-18 06:23:25.600 Oracle Coherence GE 3.3.1/389 (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a

2012-06-18 06:23:46.928 Oracle Coherence GE 3.3.1/389 (thread=Cluster, member=n/a): Created a new cluster with Member(Id=1, Timestamp=2012-06-18 06:23:25.474, Address=204.26.136.156:8088, MachineId=24220, Location=process:5149@usclssoat287, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=2) UID=0xCC1A889C00000137FF1E4F225E9C1F98

Checking the size of the cluster…

Room in the cluster…whoohoo!

Attempting to get cluster opt-$cacheStat cache…

2012-06-18 06:23:47.004 Oracle Coherence GE 3.3.1/389 (thread=pool-11-thread-1, member=1): Loaded cache configuration from resource “file:/opt/openfire/plugins/clustering/coherence-cache-config.xml”

2012-06-18 06:23:47.134 Oracle Coherence GE 3.3.1/389 (thread=ReplicatedCache, member=1): Service ReplicatedCache joined the cluster with senior service member 1

2012-06-18 06:23:47.191 Oracle Coherence GE 3.3.1/389 (thread=Invocation:OpenFire Cluster Service, member=1): Service OpenFire Cluster Service joined the cluster with senior service member 1

State of cluster is started

Get local members…

Get Oldest Loader…

Attempting to set the NodeID in XMPPServer…

Trigger Cluster Events…

2012-06-18 06:23:47.341 Oracle Coherence GE 3.3.1/389 (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1

CacheFactory is now using clustered caches…

Add clusterListener…

Is Senior Member? true

Joining cluster as node: 0xCC1A889C00000137FF1E4F225E9C1F98. Senior Member: YES

Finished loading Clustering plugin. Cluster started: SafeCluster: Name=n/a

Group{Address=224.3.3.1, Port=32386, TTL=4}

MasterMemberSet

(

ThisMember=Member(Id=1, Timestamp=2012-06-18 06:23:25.474, Address=204.26.136.156:8088, MachineId=24220, Location=process:5149@usclssoat287)

OldestMember=Member(Id=1, Timestamp=2012-06-18 06:23:25.474, Address=204.26.136.156:8088, MachineId=24220, Location=process:5149@usclssoat287)

ActualMemberSet=MemberSet(Size=1, BitSetCount=2

Member(Id=1, Timestamp=2012-06-18 06:23:25.474, Address=204.26.136.156:8088, MachineId=24220, Location=process:5149@usclssoat287)

)

RecycleMillis=120000

RecycleSet=MemberSet(Size=0, BitSetCount=0

)

)

Services

(

TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=204.26.136.156:8088}, Connections=[]}

ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.3, OldestMemberId=1}

ReplicatedCache{Name=ReplicatedCache, State=(SERVICE_STARTED), Id=1, Version=3.0, OldestMemberId=1}

InvocationService{Name=OpenFire Cluster Service, State=(SERVICE_STARTED), Id=2, Version=3.1, OldestMemberId=1}

DistributedCache{Name=DistributedCache, State=(SERVICE_STARTED), Id=3, Version=3.2, OldestMemberId=1, LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}

)

Node2 :

=====

Openfire 3.7.1 [Jun 18, 2012 6:28:32 AM]

Admin console listening at:

http://usclssoat287:9090

https://usclssoat287:9091

Starting Clustering Plugin

Starting Class Loader…

Starting to join Cluster…

2012-06-18 06:28:34.651 Oracle Coherence 3.3.1/389 (thread=pool-11-thread-1, member=n/a): Loaded operational configuration from resource “jar:file:/opt/openfire/lib/coherence.jar!/tangosol-coherence.xml”

2012-06-18 06:28:34.654 Oracle Coherence 3.3.1/389 (thread=pool-11-thread-1, member=n/a): Loaded operational overrides from resource “jar:file:/opt/openfire/lib/coherence.jar!/tangosol-coherence-override-dev.xml”

2012-06-18 06:28:34.655 Oracle Coherence 3.3.1/389 (thread=pool-11-thread-1, member=n/a): Loaded operational overrides from file “/tangosol-coherence-override.xml”

Oracle Coherence Version 3.3.1/389

Grid Edition: Development mode

Copyright © 2000-2007 Oracle. All rights reserved.

2012-06-18 06:28:34.977 Oracle Coherence GE 3.3.1/389 (thread=pool-11-thread-1, member=n/a): UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 178 packets (262144 bytes). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.

2012-06-18 06:28:35.158 Oracle Coherence GE 3.3.1/389 (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a

2012-06-18 06:28:56.475 Oracle Coherence GE 3.3.1/389 (thread=Cluster, member=n/a): Created a new cluster with Member(Id=1, Timestamp=2012-06-18 06:28:34.987, Address=204.26.136.113:8088, MachineId=24177, Location=process:18418@usclssoat285, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=2) UID=0xCC1A887100000137FF23082B5E711F98

Checking the size of the cluster…

Room in the cluster…whoohoo!

Attempting to get cluster opt-$cacheStat cache…

2012-06-18 06:28:56.523 Oracle Coherence GE 3.3.1/389 (thread=pool-11-thread-1, member=1): Loaded cache configuration from resource “file:/opt/openfire/plugins/clustering/coherence-cache-config.xml”

2012-06-18 06:28:56.588 Oracle Coherence GE 3.3.1/389 (thread=ReplicatedCache, member=1): Service ReplicatedCache joined the cluster with senior service member 1

2012-06-18 06:28:56.621 Oracle Coherence GE 3.3.1/389 (thread=Invocation:OpenFire Cluster Service, member=1): Service OpenFire Cluster Service joined the cluster with senior service member 1

State of cluster is started

Get local members…

Get Oldest Loader…

Attempting to set the NodeID in XMPPServer…

Trigger Cluster Events…

2012-06-18 06:28:56.739 Oracle Coherence GE 3.3.1/389 (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1

CacheFactory is now using clustered caches…

Add clusterListener…

Is Senior Member? true

Joining cluster as node: 0xCC1A887100000137FF23082B5E711F98. Senior Member: YES

Finished loading Clustering plugin. Cluster started: SafeCluster: Name=n/a

Group{Address=224.3.3.1, Port=32386, TTL=4}

MasterMemberSet

(

ThisMember=Member(Id=1, Timestamp=2012-06-18 06:28:34.987, Address=204.26.136.113:8088, MachineId=24177, Location=process:18418@usclssoat285)

OldestMember=Member(Id=1, Timestamp=2012-06-18 06:28:34.987, Address=204.26.136.113:8088, MachineId=24177, Location=process:18418@usclssoat285)

ActualMemberSet=MemberSet(Size=1, BitSetCount=2

Member(Id=1, Timestamp=2012-06-18 06:28:34.987, Address=204.26.136.113:8088, MachineId=24177, Location=process:18418@usclssoat285)

)

RecycleMillis=120000

RecycleSet=MemberSet(Size=0, BitSetCount=0

)

)

Services

(

TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=204.26.136.113:8088}, Connections=[]}

ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.3, OldestMemberId=1}

ReplicatedCache{Name=ReplicatedCache, State=(SERVICE_STARTED), Id=1, Version=3.0, OldestMemberId=1}

InvocationService{Name=OpenFire Cluster Service, State=(SERVICE_STARTED), Id=2, Version=3.1, OldestMemberId=1}

DistributedCache{Name=DistributedCache, State=(SERVICE_STARTED), Id=3, Version=3.2, OldestMemberId=1, LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}

)