Hello,
Environment: Debian Linux, .rpm package converted to .deb with alien -c (I am not too good at Debian and with the new, native debian package I had some dependency problem, etc.). Openfire 3.4.3.
I use Openfire with a J2ME application. The application prompted internet connection dialogue, whenever the client to server timeout happened. Somehow I learned (using the source code) that this timeout is 6 minutes by default and that I can fix it by adding the property of “xmpp.client.idle” with value 0 from the admin web interface. This is in milliseconds, setting it 0 will result in no timeout.
However, with this timeout disabled, after a while (about 2 hours and 10 minutes if my measurement was correct) a TCP timeout happens, which can be seen from the debug log:
2008.01.11 00:37:57 ConnectionHandler:
java.io.IOException: Connection timed out
at sun.nio.ch.FileDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:218)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:198)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProce ssor.java:45)
at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:485)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I left this connection open for the night, and in the morning I tried to send a chat message to the client. Openfire fails to route the packet:
2008.01.11 08:38:14 RoutingTableImpl: Failed to route packet to JID:
<packet content>
(When I restarted the client application the message was delivered.)
I receive no exception in the J2ME application about this timeout. I will need to check whether I can fix it with client side keepalive.
But the question arises: is there a way to configure the keepalive settings for the client to server XMPP connections in Openfire and if yes how?
Thanks for any help in advance.
Attila