Can anyone help me in kicking out idle users from openfire

Hi

I am using openfire version 3.4.5 and using system.client.idle equal to 60000 to kick out idle users after one minute but it is not working properly.

I used a normal client, connected to the server and pulled out my network cable from the computer but user is still appearing in session tab(even after 5 hrs) and also restarting the openfire did not remove them.

Please help.

Thanks.

restarting openfire would kick every active session. If you are showing that they are still active I would question your browser cache.

I restarted it, cleared the cache also but the users are not going.

I am getting their presence messages also.

Now I am using version 3.5.0 and if I use xmpp.client.idle equal to 30000 it works but setting the value higher than this doesn’t work.
Now I observed one more thing If I set xmpp.client.idle property and then I try to get the presence( using multiUserChat.getOccupantPresence(userJid)) of logged in users in conference then It gives the presence null. If I do not set this property then it gives the presence.

Then their clients are reconnecting as soon as the server restarts.

But I closed the client browser they cannot reconnect back.

so when you reboot the server all clients applications have been quit (not just closing the windows, as many do not quit when you do this)? if that is the case there is definitely no way the session would remain on reboot unless there is an error with your install.

Yes all clients applications were closed when I restarted the server

If it is an installation problem which kind of error it is??any idea???

No clue what would cause this behavior. All I can tell you is that a restart of openfire will cause all sessions to be disconnected. They will reconnect automatically if the client has the ability to do so (Spark can).

Thanks Todd

I am using smack and client also cannot reconnect back.

Hi I get the same problem using xmpp.client.idle. The users never disconnect.

Anyone got any clue …? I cant get anyone to disconnect… they stay connected forever and users never become idle…

Hello guys, for anyone who is still having issues with idle sessions, here is a quick fix solution while waiting for the xmpp.client.idle bug to be solved.

  1. Expose a servlet in openfire. Use one of the opensource plugin as example to do that and add a check there to verify that the session has not been idle for too long.

i.e

if((System.currentTimeMillis() - lastActive.getTime()) > 120000 ){ // This checks that the session was not idle for more than 2mins.

//Kill session

}else{

//don’t kill

}

  1. Write a nice little timer bean and call that servlet from there.

This seems to do the job for the mean time. It is not perfect but I can’t risk it and wait for other people to fix the issues. Somehow, I was forced to get dirty.

Cheers.