automatic reconnection

Bug #140408 reported by Bug Importer on 2007-05-08
Affects Status Importance Assigned to Milestone

Bug Description

If a Jabber Server goes down and startup, Coccinella can automatically
reconnect every some seconds.
Sorry for my english

sander (s-devrieze) wrote :
Changed in coccinella:
assignee: nobody → matsben
importance: Medium → Wishlist

here is my patch.
note1: there was a wrong string in it.po (and corresponding it.msg) file. It's corrected now.
note2: i added some other corrections to other bugs; look for "mirkobau" commenter in advanced search.
Those corrections are **NOT** included in this patch.

sander (s-devrieze) wrote :

Thanks for your patch. However, the change in lib/UI.tcl breaks the ability to close the whiteboard window. So, it can't be applied like this.

PS: I will commit the fix for the Italian translation.

buzzdee (sebastia) on 2009-10-14
Changed in coccinella:
milestone: none → 0.96.16
buzzdee (sebastia) on 2009-10-18
Changed in coccinella:
assignee: Mats (matsben) → buzzdee (sebastia)
buzzdee (sebastia) wrote :

With auto-login enabled, on first login, the message window stating "auto relogin in progress..." shows up.
It should not show up on first startup.

Further the error messages when Coccinella is trying to reconnect, but it is failing, because the server is still not available, they come to front, and steal the focus every X seconds, which is also rather annoying.

To overcome both problems, what about introducing some kind of global variable, tracking the state whether it is auto-login on startup or auto-reconnect after connection loss?

I'm also unable to close the whiteboard.

buzzdee (sebastia) on 2009-11-28
Changed in coccinella:
milestone: 0.96.16 → 0.96.18

i'm trying to create a better solution.
i can't assure you a patch for the next release, but in progess.

see you.

Here is the new patch.
My solution is quite basic: leave UI.tcl unchanged.

buzzdee (sebastia) wrote :

thanks for the updated patch, seems to work fine as far as I can see, however there is a small drawback:
when the connection dies, and on each unsuccsessful reconnection attempt, then two error windows show up, stealing the focus from other active applications.

This is A) at least one error message too much,
B) stealing the focus every X seconds from the active application is not good

Better would be a message window, informing the user that coccinella is trying to reconnect, which should either just stay there, as long as it tries to reconnect, and disappears, when reconnection attempt is successful. When that message window appears, I think it should not have focus.

sander (s-devrieze) wrote :

Maybe it is enough to only report this geeky information in the application status slot (see AppStatusSlot.tcl)?

In the future, this maybe can be accompanied with a big spinning busy wheel in the middle of the contacts window (to indicate is is busy connecting).

buzzdee (sebastia) wrote :

To use the application slot for the notification sounds like a very good idea.

buzzdee (sebastia) wrote :

I updated the patch a little bit, adding some more timeouts to more network error messages, and shortened some comments.
I also added a statement in the "Application Status" bar when reconnecting.

What I still want to do before checking in:
Add a global variable, which keeps track of the state whether in auto-login reconnect mode, or not.
Then I am able to only show a error for the first time, the connection breaks, and then only keep the state in the "Application Status" bar. That would get rid of the annoying error popup messages on any unsuccessful reconnection try.

Not sure whether I'll find enough time to implement that on the weekend, before the next release, and even more importantly, to be able to test this well.

buzzdee (sebastia) on 2010-03-28
Changed in coccinella:
milestone: 0.96.18 → 0.96.20
buzzdee (sebastia) on 2010-04-22
Changed in coccinella:
status: New → In Progress
buzzdee (sebastia) wrote :

svn revision #2822 contains the reconnection implementation.

I added a variable reconnecting to the Login namespace, that is usually set to 0. In the phase of reconnection to the server due to broken network connection or whatever, the variable is set to 1.
This is to suppress annoying popup error windows that would appear on every failing reconnection try.

The reconnection timeout is not variable, I used the hardcoded value that Mirko initially used.
Shall we make it configurable in the preferences? I probably should use a variable instead of the hardcoded values.

This is only lightly tested. I tested with just shutting down my ejabberd server, and starting it up afterwards. It also works while in reconnection phase connecting to another server.

There is no real way to stop the reconnection phase, otherwise than doing a connect to a different server, or closing coccinella.
Dunno if it is necessary to e.g. use the normal login button to stop the reconnection phase.

As long as the reconnection phase happens, the status is visible in the app status at the bottom.

So please test and report back about any issues.

buzzdee (sebastia) wrote :

svn revision 2838 now uses some variables, to make possible future changes to the timeout and retry values easier.

sander (s-devrieze) wrote :

"Shall we make it configurable in the preferences?" --> Not in the interface, but an option for the config file is always nice.

"Dunno if it is necessary to e.g. use the normal login button to stop the reconnection phase." --> IMO, it indeed would be nice to show the red stop button during reconnection so that users can stop the process.

sander (s-devrieze) wrote :

No issues found with a local Openfire test installation.

buzzdee (sebastia) wrote :

with svn revision 2846 I reworked the patch so that I got rid of the extra state variable "reconnection". Now using the functions ::JUI::GetConnectState and ::JUI::SetConnectState and introduced a new state there: "reconnecting".
Way much cleaner. Now when in reconnecting state, the red stop button is shown that enables the User to stop the auto reconnection process.

There is still one glitch: after stopping the reconnection process, afterwards coccinella still tries again one time to reconnect, and shows the error message from the connection attempt, before it really gives up.

buzzdee (sebastia) wrote :

with svn revision 2848, the mentioned problem in the last commit shold also be gone.

please test and report back.

sander (s-devrieze) wrote :

Reconnection seems to work fine with Openfire.

buzzdee (sebastia) on 2010-06-02
Changed in coccinella:
status: In Progress → Fix Committed
sander (s-devrieze) on 2010-09-30
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.