[jitsi-dev] Unable to reconnect after network change


#1

Hey

Often Jitsi is unable to reconnect after I moved my notebook between different networks. Looking at the logs indicates that it doesn't pick up the new nameservers (and as one of the networks is blocking requests to externals nameservers, I have to disable the parallel resolver).

A possible solution could be to invoke DNSJavas ResolverConfig.refresh() in NetworkUtils. reloadDnsResolverConfig().

-> Has anyone experienced similar issues?

Regards,
Ingo


#2

Hi Ingo,

actually this is already done there in NetworkUtils.
NetworkConfigurationChangeListener.configurationChanged on every interface up.
It could be other problem you are experiencing or this events are for
some reason not delivered. How long do you wait before considering
accounts are unable to connect.

Regards
damencho

···

On Fri, Apr 1, 2011 at 3:33 PM, Bauersachs Ingo <ingo.bauersachs@fhnw.ch> wrote:

Hey

Often Jitsi is unable to reconnect after I moved my notebook between different networks. Looking at the logs indicates that it doesn't pick up the new nameservers (and as one of the networks is blocking requests to externals nameservers, I have to disable the parallel resolver).

A possible solution could be to invoke DNSJavas ResolverConfig.refresh() in NetworkUtils. reloadDnsResolverConfig().

-> Has anyone experienced similar issues?

Regards,
Ingo


#3

Yes, i too experienced it. It happens even on my desktop (fixed ip, nameservers) if i suspend then resume it.
On my laptop is worse, because i connect to many wireless networks.
This issue appeared sometimes before the name change i think. Until then it reconnected, albeit the SIP acccount had problems (only part of the contacts showing up).
I have a Jabber and a SIP account that use IP only connections and they do no better than the Yahoo or Gmail ones.
Both computers have Debian Testing on them. Pidgin reconnects without issues.

Regards,
Kertesz Laszlo

···

----- Original Message -----

From: "Bauersachs Ingo" <ingo.bauersachs@fhnw.ch>
To: dev@jitsi.java.net
Sent: Friday, April 1, 2011 3:33:59 PM
Subject: [jitsi-dev] Unable to reconnect after network change
Hey

Often Jitsi is unable to reconnect after I moved my notebook between
different networks. Looking at the logs indicates that it doesn't pick
up the new nameservers (and as one of the networks is blocking
requests to externals nameservers, I have to disable the parallel
resolver).

A possible solution could be to invoke DNSJavas
ResolverConfig.refresh() in NetworkUtils. reloadDnsResolverConfig().

-> Has anyone experienced similar issues?

Regards,
Ingo


#4

Hey

actually this is already done there in NetworkUtils.
NetworkConfigurationChangeListener.configurationChanged on every interface
up.

Yes and no. It only resets the ParallelResolver - and I can't use the ParallelResolver. The call to ResolverConfig.refresh(); in ParallelResolver.reset should probably be moved to NetworkUtils.reloadDnsResolverConfig and called regardless of what instance the parallelResolver field has assigned.
This is probably even my fault when I created the patch to disable the ParallelResolver.

It could be other problem you are experiencing or this events are for
some reason not delivered.

UnknownHostException pretty much indicate unavailable DNS servers...

How long do you wait before considering
accounts are unable to connect.

Is almost two hours enough? :wink:

Regards,
Ingo


#5

Hi,

Yes two hours are enough :slight_smile: Aha I see what you mean, this only works
with parallel resolver enabled, will fix it.

Hey Kertesz you can enable
'net.java.sip.communicator.plugin.reconnectplugin.level =FINER' and
'net.java.sip.communicator.util.FileHandler.level = FINER' in your
logging.properties and when this happen can send the logs there will
be info what network change we have detected.

Thanks
damencho

···

On Fri, Apr 1, 2011 at 4:14 PM, Bauersachs Ingo <ingo.bauersachs@fhnw.ch> wrote:

Hey

actually this is already done there in NetworkUtils.
NetworkConfigurationChangeListener.configurationChanged on every interface
up.

Yes and no. It only resets the ParallelResolver - and I can't use the ParallelResolver. The call to ResolverConfig.refresh(); in ParallelResolver.reset should probably be moved to NetworkUtils.reloadDnsResolverConfig and called regardless of what instance the parallelResolver field has assigned.
This is probably even my fault when I created the patch to disable the ParallelResolver.

It could be other problem you are experiencing or this events are for
some reason not delivered.

UnknownHostException pretty much indicate unavailable DNS servers...

How long do you wait before considering
accounts are unable to connect.

Is almost two hours enough? :wink:

Regards,
Ingo


#6

Hm. Maybe i did something wrong, but i get this:

Can't load log handler "net.java.sip.communicator.plugin.reconnectplugin"

The "net.java.sip.communicator.util.FileHandler.level" handler was there (/usr/lib/jitsi/lib/logging.properties), but the reconnectplugin was not - i added it to the end of the file and in the handler list but i dont know if thats ok.

So, this time on my desktop it reconnected only after i pinged the SIP server - then all accounts reconnected at once, including the Yahoo and Gmail.

I have 2 accounts that use an OpenVPN connection (1 jabber + 1 SIP - the servers are given by ip) + 1 Gmail and 1 Yahoo account configured. The VPN connection reconnects usually quite fast and i can access resources on it, but usually Jitsi takes its time and if it does reconnect, i dont have the whole SIP contact list, only if i untick/tick it on the accounts list.

Regards,
Kertesz Laszlo

sip-communicator0.log.1 (84.8 KB)

···

----- Original Message -----

From: "Damian Minkov" <damencho@jitsi.org>
To: dev@jitsi.java.net
Cc: "Bauersachs Ingo" <ingo.bauersachs@fhnw.ch>
Sent: Friday, April 1, 2011 4:23:03 PM
Subject: [jitsi-dev] Re: Unable to reconnect after network change
Hi,

Yes two hours are enough :slight_smile: Aha I see what you mean, this only works
with parallel resolver enabled, will fix it.

Hey Kertesz you can enable
'net.java.sip.communicator.plugin.reconnectplugin.level =FINER' and
'net.java.sip.communicator.util.FileHandler.level = FINER' in your
logging.properties and when this happen can send the logs there will
be info what network change we have detected.

Thanks
damencho

On Fri, Apr 1, 2011 at 4:14 PM, Bauersachs Ingo > <ingo.bauersachs@fhnw.ch> wrote:
> Hey
>
>> actually this is already done there in NetworkUtils.
>> NetworkConfigurationChangeListener.configurationChanged on every
>> interface
>> up.
>
> Yes and no. It only resets the ParallelResolver - and I can't use
> the ParallelResolver. The call to ResolverConfig.refresh(); in
> ParallelResolver.reset should probably be moved to
> NetworkUtils.reloadDnsResolverConfig and called regardless of what
> instance the parallelResolver field has assigned.
> This is probably even my fault when I created the patch to disable
> the ParallelResolver.
>
>> It could be other problem you are experiencing or this events are
>> for
>> some reason not delivered.
>
> UnknownHostException pretty much indicate unavailable DNS servers...
>
>> How long do you wait before considering
>> accounts are unable to connect.
>
> Is almost two hours enough? :wink:
>
> Regards,
> Ingo
>

--
O zi buna,
Kertesz Laszlo


#7

Hi again Kertesz,

Hm. Maybe i did something wrong, but i get this:

Can't load log handler "net.java.sip.communicator.plugin.reconnectplugin"

The "net.java.sip.communicator.util.FileHandler.level" handler was there (/usr/lib/jitsi/lib/logging.properties), but the reconnectplugin was not - i added it to the end of the file and in the handler list but i dont know if thats ok.

Thats exactly what you had to do.

So, this time on my desktop it reconnected only after i pinged the SIP server - then all accounts reconnected at once, including the Yahoo and Gmail.

I have 2 accounts that use an OpenVPN connection (1 jabber + 1 SIP - the servers are given by ip) + 1 Gmail and 1 Yahoo account configured. The VPN connection reconnects usually quite fast and i can access resources on it, but usually Jitsi takes its time and if it does reconnect, i dont have the whole SIP contact list, only if i untick/tick it on the accounts list.

I don't see anything suspicious at the logs, you wake up your PC at
16:41:03.069, and after everything going down, the last interface came
up at 16:41:06.720 when every provider start connecting and the
providers went one by one on, and only one was not connected when
Jitsi was shutdown at 16:42:00.157.

I will check once again the delays between reconnects, currently every
next account is reconnected after a certain time, this time start from
8 sec. by growing with 30 sec. till it reaches 5 min. As you have many
interfaces going from down to up after standby it may happen some
provider to go to maximum delay (will reconnect after 5 minutes).

Thanks for the logs and testing
damencho

···

On Fri, Apr 1, 2011 at 4:47 PM, Kertesz Laszlo <laszlo.kertesz@gmail.com> wrote:

Regards,
Kertesz Laszlo

----- Original Message -----

From: "Damian Minkov" <damencho@jitsi.org>
To: dev@jitsi.java.net
Cc: "Bauersachs Ingo" <ingo.bauersachs@fhnw.ch>
Sent: Friday, April 1, 2011 4:23:03 PM
Subject: [jitsi-dev] Re: Unable to reconnect after network change
Hi,

Yes two hours are enough :slight_smile: Aha I see what you mean, this only works
with parallel resolver enabled, will fix it.

Hey Kertesz you can enable
'net.java.sip.communicator.plugin.reconnectplugin.level =FINER' and
'net.java.sip.communicator.util.FileHandler.level = FINER' in your
logging.properties and when this happen can send the logs there will
be info what network change we have detected.

Thanks
damencho

On Fri, Apr 1, 2011 at 4:14 PM, Bauersachs Ingo >> <ingo.bauersachs@fhnw.ch> wrote:
> Hey
>
>> actually this is already done there in NetworkUtils.
>> NetworkConfigurationChangeListener.configurationChanged on every
>> interface
>> up.
>
> Yes and no. It only resets the ParallelResolver - and I can't use
> the ParallelResolver. The call to ResolverConfig.refresh(); in
> ParallelResolver.reset should probably be moved to
> NetworkUtils.reloadDnsResolverConfig and called regardless of what
> instance the parallelResolver field has assigned.
> This is probably even my fault when I created the patch to disable
> the ParallelResolver.
>
>> It could be other problem you are experiencing or this events are
>> for
>> some reason not delivered.
>
> UnknownHostException pretty much indicate unavailable DNS servers...
>
>> How long do you wait before considering
>> accounts are unable to connect.
>
> Is almost two hours enough? :wink:
>
> Regards,
> Ingo
>

--
O zi buna,
Kertesz Laszlo