Jigasi & reconnecting plugin

Hi there,

I’m strugling with my Jigasi setup, it works but sometimes it seems to loose the connection with my Asterisk box, then it does not automatically reconnects.

Upon searching, I found out that there are a “reconnecting plugin”, so I tried to set it up, but I can’t get it to work.

For now here is my configuration:

net.java.sip.communicator.impl.protocol.sip.acc1403273890647.USER_ID=jitsi
...
net.java.sip.communicator.plugin.reconnectplugin.ATLEAST_ONE_SUCCESSFUL_CONNECTION.SIP\:jitsi=true
net.java.sip.communicator.plugin.reconnectplugin.RECONNECT_DELAY_MIN.SIP\:jitsi=2
net.java.sip.communicator.plugin.reconnectplugin.RECONNECT_DELAY_MAX.SIP\:jitsi=10

I wasn’t able to find any documentation for the reconnectplugin, someone has it?
When I kill my asterisk box, nothing happens in the jigasi logs, weird since I use Keep-Alive:

net.java.sip.communicator.impl.protocol.sip.acc1403273890647.KEEP_ALIVE_INTERVAL=5
net.java.sip.communicator.impl.protocol.sip.acc1403273890647.KEEP_ALIVE_METHOD=OPTIONS

Any help would be appreciated :slight_smile:

That should enable the sip side of things.

You should not do anything and reconnect should be working …

Hi @damencho,

Many thanks for the hint :+1: , it is working but now it seems that reconnect plugin give up after about 10 minutes, can I configure it to try indefinately?

Here are the relevant logs:

jigasi_1  | Jigasi 2020-09-18 11:39:49.305 INFO: [89] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: Setting SIPMessage peerPacketSource to: /192.168.100.20:5060
jigasi_1  | Jigasi 2020-09-18 11:40:14.298 INFO: [90] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: Setting SIPMessage peerPacketSource to: /192.168.100.20:5060

jigasi_1  | Jigasi 2020-09-18 11:49:09.499 INFO: [30] plugin.reconnectplugin.PPReconnectWrapper.scheduleReconnectIfNeeded().425 Reconnect ProtocolProviderServiceSipImpl(SIP:jitsi@192.168.100.20) after 4000 ms.
jigasi_1  | Jigasi 2020-09-18 11:49:09.500 INFO: [30] org.jitsi.jigasi.SipGateway.registrationStateChanged().120 REG STATE CHANGE ProtocolProviderServiceSipImpl(SIP:jitsi@192.168.100.20) -> RegistrationStateChangeEvent[ oldState=Registered; newState=RegistrationState=Connection Failed; userRequest=false; reasonCode=-1; reason=A timeout occurred while trying to connect to the server.]
jigasi_1  | Jigasi 2020-09-18 11:49:09.501 INFO: [30] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been stopped
jigasi_1  | Jigasi 2020-09-18 11:49:10.502 INFO: [30] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been stopped
jigasi_1  | Jigasi 2020-09-18 11:49:13.500 INFO: [34] plugin.reconnectplugin.PPReconnectWrapper.run().452 Start reconnecting ProtocolProviderServiceSipImpl(SIP:jitsi@192.168.100.20)
jigasi_1  | Jigasi 2020-09-18 11:49:13.502 INFO: [34] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been started
jigasi_1  | Jigasi 2020-09-18 11:49:13.504 INFO: [34] org.jitsi.jigasi.SipGateway.registrationStateChanged().120 REG STATE CHANGE ProtocolProviderServiceSipImpl(SIP:jitsi@192.168.100.20) -> RegistrationStateChangeEvent[ oldState=Unregistered; newState=RegistrationState=Registering; userRequest=false; reasonCode=-1; reason=null]

Still trying to overcome this,

I enabled the HEALTH_CHECK_SIP_URI, it works when asterisk is UP, but then, after the reconnect plugin give up after 10 minutes since last successfull check, then the health check via SIP URI fails too:

jigasi_1  | Jigasi 2020-09-21 11:58:27.925 SEVERE: [51] org.jitsi.jigasi.health.SipHealthPeriodicChecker.log() Health check failed in 0ms:
jigasi_1  | net.java.sip.communicator.service.protocol.OperationFailedException: The protocol provider should be registered before placing an outgoing call.
jigasi_1  |     at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.assertRegistered(OperationSetBasicTelephonySipImpl.java:2182)
jigasi_1  |     at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:158)
jigasi_1  |     at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:193)
jigasi_1  |     at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createCall(OperationSetBasicTelephonySipImpl.java:141)
jigasi_1  |     at org.jitsi.jigasi.health.SipHealthPeriodicChecker.doCheck(SipHealthPeriodicChecker.java:283)
jigasi_1  |     at org.jitsi.jigasi.health.SipHealthPeriodicChecker.doRunInternal(SipHealthPeriodicChecker.java:223)
jigasi_1  |     at org.jitsi.jigasi.health.SipHealthPeriodicChecker.doRun(SipHealthPeriodicChecker.java:207)
jigasi_1  |     at org.jitsi.utils.concurrent.PeriodicRunnableWithObject.run(PeriodicRunnableWithObject.java:87)
jigasi_1  |     at org.jitsi.utils.concurrent.RecurringRunnableExecutor.run(RecurringRunnableExecutor.java:216)
jigasi_1  |     at org.jitsi.utils.concurrent.RecurringRunnableExecutor.runInThread(RecurringRunnableExecutor.java:292)
jigasi_1  |     at org.jitsi.utils.concurrent.RecurringRunnableExecutor.access$000(RecurringRunnableExecutor.java:36)
jigasi_1  |     at org.jitsi.utils.concurrent.RecurringRunnableExecutor$1.run(RecurringRunnableExecutor.java:328)

And since the reconnect plugin is not trying anymore to reconnect, jigasi is completely stuck.

So I think my best chance is to make the reconnect plugin to keep trying reconnecting, but I can’t find how.

Hello,

Still trying to figure this out :slight_smile:

When it gave up, you need to make a heap dump and inspect the states of those two classes which holds the reconnect logic.


Or another thing you can do is to enable debug logging just for those and see what is printed, maybe something can give you a trace.
net.java.sip.communicator.plugin.reconnectplugin.level=ALL