Openfire

xmpp.client.idle should disconnect an idle client

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 3.6.4
  • Fix Version/s: 3.7.2
  • Component/s: Core
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

As it says in http://www.igniterealtime.org/community/docs/DOC-1061 xmpp.client.idle system property should disconnect an idle client after an idle equal to a properties value (in milliseconds). It seem that this doesnt work anymore. If i set this say to 60000 and then let the client idle for a few minutes it still stays connected all the time. Not sure if it ever was working, but disabling of it seemed to do the trick (-1 value) as i never had an issue of frequent client disconnects after an idle. Anyway, probably it needs some investigation in the code.

Activity

Hide
jonathan added a comment -

Hello and sorry for being annoying. Just wanted to know if anyone has any lead on this.
Thanks.

Show
jonathan added a comment - Hello and sorry for being annoying. Just wanted to know if anyone has any lead on this. Thanks.
Hide
wroot added a comment -

jonathan, sorry, but i doubt this will be fixed soon. You should think about a workaround for your needs.

Show
wroot added a comment - jonathan, sorry, but i doubt this will be fixed soon. You should think about a workaround for your needs.
Hide
jonathan added a comment -

No worries, I know how it is with opensource projects. Opensource projecs are all the good will / effort people put in and I appreciate the product that is already available. I found a way to fix that xmpp.client.idle issue. It can be done by adding a timer bean and then closing idle connections. Haven't tried it out yet. Will post something for other users if I get it working.

Cheers.

Show
jonathan added a comment - No worries, I know how it is with opensource projects. Opensource projecs are all the good will / effort people put in and I appreciate the product that is already available. I found a way to fix that xmpp.client.idle issue. It can be done by adding a timer bean and then closing idle connections. Haven't tried it out yet. Will post something for other users if I get it working. Cheers.
Hide
Daryl Herzmann added a comment -

Hi Jonathan,

Do you have a working solution to share?

thanks,
daryl

Show
Daryl Herzmann added a comment - Hi Jonathan, Do you have a working solution to share? thanks, daryl
Hide
jonathan added a comment -

Hello Daryl, I got that issue fixed by implementing a timer bean which calls a servlet exposed via an openfire plugin every X seconds . It is not perfect but works . You will need to write a small plugin for openfire which checks the session of every user. ( i.e if currentmillis - lastactive > Y secs and exposes a servlet, close session).

Hope that helps.

Show
jonathan added a comment - Hello Daryl, I got that issue fixed by implementing a timer bean which calls a servlet exposed via an openfire plugin every X seconds . It is not perfect but works . You will need to write a small plugin for openfire which checks the session of every user. ( i.e if currentmillis - lastactive > Y secs and exposes a servlet, close session). Hope that helps.
Hide
wroot added a comment -

It's weird, but after i have switched xmpp.idle to 60000 (1 minute) i'm now constantly seeing my Exodus disconnecting and reconnecting while i;m idle with it. Though i can reproduce it when i'm trying. Maybe it actually works, but not with every client, maybe Spark is not sending something or maybe it sends some heartbeats that emulate the activity. I will try to set xmpp.idle to -1 again and watch Exodus.

Show
wroot added a comment - It's weird, but after i have switched xmpp.idle to 60000 (1 minute) i'm now constantly seeing my Exodus disconnecting and reconnecting while i;m idle with it. Though i can reproduce it when i'm trying. Maybe it actually works, but not with every client, maybe Spark is not sending something or maybe it sends some heartbeats that emulate the activity. I will try to set xmpp.idle to -1 again and watch Exodus.
Hide
wroot added a comment -

So, now with -1 value i dont get constant Exodus disconnects. It seems this option is some how working but not all the time and not with all clients.

Show
wroot added a comment - So, now with -1 value i dont get constant Exodus disconnects. It seems this option is some how working but not all the time and not with all clients.
Hide
jonathan added a comment -

well i dont really know who is assigned to fix that but i think we can't really depend on them to fix it. It has to be fixed by the community which is going to be tough...

Show
jonathan added a comment - well i dont really know who is assigned to fix that but i think we can't really depend on them to fix it. It has to be fixed by the community which is going to be tough...
Hide
Michael added a comment -

I remember a thread that was discussing keepalives (http://www.igniterealtime.org/community/message/150011#150011). Could this have something to do with the issue?

Show
Michael added a comment - I remember a thread that was discussing keepalives (http://www.igniterealtime.org/community/message/150011#150011). Could this have something to do with the issue?
Hide
wroot added a comment -

This seems to be related to OF-72. I closed it, because i wasn't able to reproduce. After setting xmpp.client.idle to 60000 i see that it is disconnecting, but not just idle client. It disconnects idle/broken sessions, which are not sending any keepalives. I will have to test more to see if my clients are now reconnecting all the time. I think there has to be 2 separate options for this. Because i don't want to disconnect client which is Away for some time, but i want to disconnect client which connection has been broken. Though, maybe it is our old Exodus client fault and it doesn't send correct keepalives.

Show
wroot added a comment - This seems to be related to OF-72. I closed it, because i wasn't able to reproduce. After setting xmpp.client.idle to 60000 i see that it is disconnecting, but not just idle client. It disconnects idle/broken sessions, which are not sending any keepalives. I will have to test more to see if my clients are now reconnecting all the time. I think there has to be 2 separate options for this. Because i don't want to disconnect client which is Away for some time, but i want to disconnect client which connection has been broken. Though, maybe it is our old Exodus client fault and it doesn't send correct keepalives.

People

Vote (4)
Watch (6)

Dates

  • Created:
    Updated: