1. install Oracle Coherence 3.4, not the latest version 3.7 (to avoid error: java.lang.NoSuchMethodError: com.tangosol.net.CacheFactory.getInvocationService(Ljava/lang/String;)Lcom/tangosol/net/InvocationService,
java.lang.NoClassDefFoundError: com/tangosol/net/Invocable )
Following steps help is published by:Eitan Ben-Noach
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 )
9. Restart the server. To load clustering.jar from the lib folder.
10. 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
2. 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)