Openfire 4 and Hazelcast 2.2.0

Hello,

I am attempting to build a new cluster with two Openfire servers that have version 4.0 installed. When I install the hazelcast plugin on each server and then open clustering settings I get the following error:

Exception:

java.lang.NullPointerException
     at org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory.getClusterNodesInfo(ClusteredCacheFactory.java:228)
     at org.jivesoftware.util.cache.CacheFactory.getClusterNodesInfo(CacheFactory.java:520)
     at org.jivesoftware.openfire.cluster.ClusterManager.getNodesInfo(ClusterManager.java:393)
     at org.jivesoftware.openfire.admin.system_002dclustering_jsp._jspService(system_002dclustering_jsp.java:132)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
     at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
     at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
     at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:76)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
     at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:53)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
     at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:80)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
     at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:162)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
     at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
     at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
     at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
     at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
     at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
     at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
     at org.eclipse.jetty.server.Server.handle(Server.java:497)
     at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
     at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
     at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
     at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
     at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
     at java.lang.Thread.run(Thread.java:745)

Any thoughts?

Thanks for your help!

Dan

That error should not happen, but perhaps indicates that the cluster has not actually been started. I have opened OF-1045 to track this issue.

As a possible workaround, you can try starting the cluster at startup by adding the following XML property to your conf/openfire.xml (before the tag):

true

You can make this change on each of the servers in your cluster when Openfire is stopped, and the cluster should be enabled upon restart.

I am not the original poster, but I have this issue too [1]. I tried your suggestion “true” and it didn’t help. In fact, after restart, clustering still shows disabled even though openfire.xml has this setting.

I’ve reproduced on a fresh OF 4.0 install with just just hazelcast plugin. There isn’t much to it, a one node cluster. Enable clustering results in “java.lang.NullPointerException”

I tried using:

both JDK 1.7 and JDK 1.8

both using multicast and tcp-ip explicitly listing each member in the Hazlecast plugin

on both Fedora 22 and Ubuntu 14.04 LTS

[1] I will move to another thread if that’s the preferred way to do things here.

By default I see that error too, but for my config it’s not a problem, I’m using manual config with list of nodes added into “/opt/openfire/plugins/hazelcast/classes/hazelcast-cache-config.xml” like it described in manual:

of-node-a.example.com:5701

of-node-b.example.com:5701

and it shows no exception with that config set.

I’ve tried similar manual config using tcp-ip enabled and still have the issue.

We have a prospective fix for this issue, thanks for reporting. Feel free to track the current status via OF-1045.

1 Like

I still get a crash, both servers 4.0.1.

1 Like

I see this exception as well and it seems related to something I reported here a couple of days ago: NPE during hazelcast init.

When the NPE during init happens, I’ll see the same NPE as described in the discussion.

1 Like

Hi,

I’m still facing the issue in OF 4.0.3 version. For one node it is showing enabled but for another still showing disabled.

Thanks,

AKS