Openfire异常备忘录

1. XMPP无法连接

 1.1 异常信息

 1.1.1 error.log

2014.10.31 12:03:15 org.jivesoftware.util.cache.CacheFactory - Hazelcast instance is not active!
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is not active!
        at com.hazelcast.spi.AbstractDistributedObject.getService(AbstractDistributedObject.java:74)
        at com.hazelcast.map.proxy.MapProxySupport.getLocalMapStats(MapProxySupport.java:817)
        at com.hazelcast.map.proxy.MapProxyImpl.getLocalMapStats(MapProxyImpl.java:44)
        at com.jivesoftware.util.cache.ClusteredCache.getCacheSize(ClusteredCache.java:146)
        at org.jivesoftware.util.cache.CacheWrapper.getCacheSize(CacheWrapper.java:73)
        at com.jivesoftware.util.cache.ClusteredCacheFactory.updateCacheStats(ClusteredCacheFactory.java:412)
        at org.jivesoftware.util.cache.CacheFactory$1.run(CacheFactory.java:691)

 1.1.2 warn.log

2014.10.31 11:24:06 org.apache.mina.common.support.DefaultExceptionMonitor - Unexpected exception.
java.io.IOException: Too many open files
        at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:241)
        at org.apache.mina.transport.socket.nio.SocketAcceptor$Worker.processSessions(SocketAcceptor.java:273)
        at org.apache.mina.transport.socket.nio.SocketAcceptor$Worker.run(SocketAcceptor.java:225)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

 1.2 解决措施

 1.2.1 OOM导致Openfire无法连接

    1.2.1.1重启Openfire服务

# ps -ef | grep openfire
# kill -9 pid
# honup ./openfire.sh &

     1.2.1.2 修改配置文件:/etc/sysconfig/openfire

# If you wish to set any specific options to pass to the JVM, you can
# set them with the following variable.
#OPENFIRE_OPTS="-Xmx1024m"

 

 

 1.2.2 增加文件打开数量限制, 编辑文件: /etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536

 

你可能感兴趣的:(openfire)