0

Sometimes we retrieve the below exception during reconnection and only works after restarting the application:

Session state is CLOSED. Trying reconnect... 
Trying disconnect ... 
Disconnected...
Waiting 1 seconds to retry
java.io.IOException: Receive negative bind response: Negative response 00000005 found
    at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:246)
    at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:160)

We are using jsmpp-2.2.0 and some options are

bindType = BindType.BIND_TX
enquireLinkTimer=10000
transactionTimer=20000L

Our reconnection conditions like below:

if (smppSession.getSessionState() == SessionState.CLOSED 
     || smppSession.getSessionState() == SessionState.OUTBOUND
     || smppSession.getSessionState() == SessionState.UNBOUND) {
    //smppSession.unbindAndClose then smppSession.connectAndBind
    reconnect();
}

In smpp3.4 specification written ESME_RALYBND, 0x00000005, ESME Already in Bound State

How can we resolve this problem, and what is the reason? Please help

nikli
  • 2,281
  • 2
  • 24
  • 38
  • First I would use Wireshark to see if there is UNBIND sent (on disconnecting). Otherwise SMSC would have ESME still active (and responding with the error above. Also check if SMSC has an option that socket close (Tcp FIN) would also unbind ESME from the active sessions – Marvin Nov 21 '22 at 01:12

0 Answers0