[jitsi-users] Re: DNS SRV Load balancing - Proxy failover detection using TCP


#1

Hello,

I find this thread that reflects my same error with the last night version
of jitsi.

I have the same problem with a NAPTR and SRV scenario with TCP and 2
porxys (master - secondary). The destination discovery with NAPTR and SRV
works fine and the proxy connection is successful, but when the proxy is
down get this exception when the account send a new call, o try to send an
OPTION keep alive packet:

...
    [java] 09:59:40.267 GRAVE: [19]
impl.protocol.sip.ProtocolProviderServiceSipImpl.getLocalViaHeaders().1244
Unable to create a via header for port
5060
    [java] java.net.ConnectException: Connection refused: connect
...

The code try to build headers from the currently established connection but
this socket is dead because the socket is dead and never refresh the state
at autoproxy.

I reviewed the code and I have written a small patch that capture that
exception when the provider keepalive method catch the exception and
shutdown and then initialize the provider to refresh the protocol factory
from srv records priority to the secondary proxy.

It work fine but is a heavy solution. ¿Is this an issue ?

oscar.