Page 1 of 1

Connection recovery can send multiple bind requests

Posted: Tue May 12, 2020 6:37 am
by shane
Hi,

After a client is disconnected from a server, it attempts to reconnect and rebind.

If the server is in a bad state, where it accepts the connection but does not respond to messages, these binding attempts with fail with SMPPCLIENT_RCVTIMEOUT and the socket will be disconnected. The client will then try again. When the server recovers and the client automatically reconnects, the client will erroneously send multiple bind requests, presumably attempting to resend all of the bind requests which previously failed to be responded to when the server was in a bad state.

You can reproduce the server in a bad state by pausing for debugging on the server.

On another related occasion (which I can't reproduce), I also received lots of logs about duplicate sequence numbers being used.

Interesting parts of logs:

Code: Select all

Client when server becomes unresponsive:

12.05.2020 16:21:22:WARN : 63: (SmppClient3) EnquireLink failed. Response Status SMPPCLIENT_RCVTIMEOUT. Sequence 4. InterNetwork/localhost:7799 SystemId: 2-tx
Disconnected event raised.
12.05.2020 16:23:03:WARN : 94: (SmppClient3) Bind failed. Status SMPPCLIENT_RCVTIMEOUT. Repeat in 1 seconds.
Disconnected event raised.
...etc

Server after it recovers: (in this case, restarted)

Client 127.0.0.1:61349 bound as 2-tx
Client 127.0.0.1:61349 bound as 2-tx
Client 127.0.0.1:61349 bound as 2-tx

Client after connection is recovered:

12.05.2020 16:24:35:WARN :138: (SmppClient3) Cannot find request for response BindTransceiverResp, Status: ESME_ROK, Sequence: 10, SystemId: Inetlab.SMPP. Response was received after ResponseTimeout or with wrong sequence_number.

Re: Connection recovery can send multiple bind requests

Posted: Wed May 13, 2020 12:57 pm
by alt
Hi shane,

I think it was an error in starting reconnect task from disconnect event. SmppClient has started new reconnect task every time when it disconnects. The previous reconnect task waits for connection and when client connects all tasks sends bind request.
I'm going to fix this bug in the version 2.8.1

Re: Connection recovery can send multiple bind requests

Posted: Thu May 14, 2020 1:26 am
by shane
Sounds good!

Re: Connection recovery can send multiple bind requests

Posted: Thu May 14, 2020 2:08 pm
by alt
Please test with version 2.8.1-beta-2021.

Re: Connection recovery can send multiple bind requests

Posted: Wed Jan 18, 2023 9:20 am
by TradeLabelSoftware
when are you launching the full version 2.8.1 ?

Re: Connection recovery can send multiple bind requests

Posted: Wed Jan 18, 2023 4:50 pm
by alt
It is already released. See the change log.

Re: Connection recovery can send multiple bind requests

Posted: Sun Feb 05, 2023 3:10 pm
by Arshi
There is multiple version available on the changelog page which one should i use?GBWhatsApp