All users are kicked off Openfire nightly

Every night, usually around 2 am every user connected to Openfire gets kicked off. The local client logs don’t state anything. Server logs only ever show LDAP related messages around the times when it happens such as (usernamed removed from logs for privacy purposes):

2008.05.28 01:59:44 ConnectionHandler:

java.io.IOException: Connection reset by peer

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)

2008.05.28 01:59:44 008533 (01/12/00) - Connection #6 tested: OK

2008.05.28 01:59:44 008534 (01/12/00) - Connection #6 tested: OK

2008.05.28 01:59:44 LdapManager: Trying to find a user’s DN based on their username. sAMAccountName: , Base DN: DC=,DC=,DC=com…

2008.05.28 01:59:44 LdapManager: Creating a DirContext in LdapManager.getContext()…

2008.05.28 01:59:44 LdapManager: Created hashtable with context values, attempting to create context…

2008.05.28 01:59:44 LdapManager: … context created successfully, returning.

2008.05.28 01:59:44 LdapManager: Starting LDAP search…

2008.05.28 01:59:44 LdapManager: … search finished

2008.05.28 01:59:44 LdapManager: Trying to find a user’s DN based on their username. sAMAccountName: , Base DN: DC=,DC=,DC=com…

2008.05.28 01:59:44 LdapManager: Creating a DirContext in LdapManager.getContext()…

2008.05.28 01:59:44 LdapManager: Created hashtable with context values, attempting to create context…

2008.05.28 01:59:44 LdapManager: … context created successfully, returning.

2008.05.28 01:59:44 LdapManager: Starting LDAP search…

2008.05.28 01:59:44 LdapManager: … search finished

2008.05.28 01:59:44 LdapManager: Creating a DirContext in LdapManager.getContext()…

2008.05.28 01:59:44 LdapManager: Created hashtable with context values, attempting to create context…

2008.05.28 01:59:44 LdapManager: … context created successfully, returning.

2008.05.28 01:59:44 008534 (01/12/00) - Connection #8 tested: OK

2008.05.28 01:59:44 008535 (01/12/00) - Connection #8 tested: OK

2008.05.28 02:00:36 008535 (01/12/00) - Connection #9 tested: OK

2008.05.28 02:01:17 008536 (02/11/01) - Connection #10 tested: OK

2008.05.28 02:01:21 008537 (02/12/00) - Connection #10 tested: OK

2008.05.28 02:01:21 008537 (02/12/00) - Connection #12 tested: OK

2008.05.28 02:01:21 008538 (02/12/00) - Connection #12 tested: OK

Openfire Version: 3.5.1

Spark Version: 2.5.8

OS: SLES 10

Database: MySQL 5.0.51

LDAP Server: Windows 2000 Advanced Server - Active Directory

Other services on the server itself do not disconnect the users and seem to work just fine. Another interesting thing to note is when I manually shutdown the server, when it’s turned back on, every user tends to automatically reconnect. When they’re disconnected due to the server error every night, automatic reconnection does not happen. Manually reconnecting works fine.

If there’s any other information that would be useful in troubleshooting and resolving this issue, please let me know.

What cron jobs are running at 2:00am on your server? Is your AD server going down for backup at that time?

No scheduled tasks are happening at that time, and nothing is happening with the Active Directory server. The time it goes down is not exactly the same but it tends to be between 2am - 4am.

Not sure, but can you try setting such property in Admin Console:

xmpp.client.idle -1

This appears to have resolved the issue. Thanks!

can you explain what “xmpp.client.idle -1” had to do with that bug ? I’m just curious

I cant say it’a a bug. Server will automatically disconnect clients that are not sending heartbeats signal. So this could be issue with a client. -1 value simply disables that disconnecting of idle clients.

Maybe this should be looked into further, then. Most users are using Spark 2.5.7 and Spark 2.5.8 to connect to the Openfire 3.5.1 server. The users’ operating system is Windows XP SP2 and when they leave for the day, all that happens is they lock the computer and walk away.