powered by Jive Software

Client Connection dropping randomly in (openfire - 4.4.1)

Hi Team,

I have recently upgraded my openfire server (4.1.3) to latest version (4.4.1) and now client connections are dropping randomly with the following error.


2019.09.20 05:32:16 WARN [socket_c2s-thread-2]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x000000CF: nio socket, server, null => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:?]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) ~[?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:245) ~[?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:223) ~[?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) ~[?:?]
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:378) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:47) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:519) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1222) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1211) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683) ~[mina-core-2.1.3.jar:?]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) ~[mina-core-2.1.3.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:835) [?:?]

I have disabled SM from the server (stream.management.active = false) and rebooted the server as well but it didn’t solved the problem.

I have also incresed the max file open file-max to 65535 and also increased the hard limit to 65535 to my ubuntu server.

Also the DNS timeout is 1800 sec which is 30 min.

I am not using any clusters or multi domain server before this upgrade everything was working perfectly.

What is best alternative to use for this condition as our production server got stuck we are losing the users at very high rate.

Thanks,
Hiren Vavadiya

This error isn’t telling us much more than that the client has unexpectedly closed the connection. I’m happy to accept that this was not the case in Openfire 4.1.3, but from the error that you posted, it’s impossible to determine what’s causing the behavior in 4.4.1.

Does your client have any logging that hints at why it disconnects?

I don’t have any logs from client as of now but i will post as soon as possible.

Situation is like there are many concurrent sessions around 50k session and it drops to 10k.

But the devices(10-15 test device) i am logged in never drops a session so I don’t have any logs but i am sure there are something goes wrong.

So i am still investigating what went wrong at that time not sure but it is really painful situation.

Anyway thanks for your response.