MazWoz / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

connection restart : "Failed connecting" #82

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm having trouble with jsmpp with smslib. After any error in jsmpp layer, 
smslib tries to "restart" connection by calling unbind() and connectAndBind(). 
Following lines throws exception, and connections never getting restored.

logger.debug("Connect and bind to {} port {}", host, port);
       if (sequence().currentValue() != 1) {
              throw new IOException("Failed connecting");
}

Here is my log.
2010-08-19 23:56:31,820 DEBUG (AbstractSession.java) - <unbind response 
received>
2010-08-19 23:56:31,820 DEBUG (Logger.java) - <Stopped.>
2010-08-19 23:56:31,821 INFO (SMPPSession.java) - <PDUReaderWorker stop>
2010-08-19 23:56:31,821 DEBUG (Logger.java) - <NotifyQueueManager end...>
2010-08-19 23:56:31,821 DEBUG (SMPPSession.java) - <Connect and bind to 
217.118.84.12 port 3334>
2010-08-19 23:56:31,821 ERROR (Logger.java) - <Error while starting Gateway: 
beeline>
java.io.IOException: Failed connecting
        at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:218)
        at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:200)
        at org.smslib.smpp.jsmpp.JSMPPGateway.startGateway(JSMPPGateway.java:143)
        at org.smslib.Service$WatchDog.process(Service.java:1612)
        at org.smslib.threading.AServiceThread.run(AServiceThread.java:117)

Original issue reported on code.google.com by farafon...@gmail.com on 19 Aug 2010 at 11:21

GoogleCodeExporter commented 8 years ago
hello,
 I have the same error.

Original comment by pyboud...@gmail.com on 29 Nov 2010 at 2:53

GoogleCodeExporter commented 8 years ago
When session is unbound, u can't reuse/re-open it. Please create new session

Original comment by uuda...@gmail.com on 30 Nov 2010 at 2:18

GoogleCodeExporter commented 8 years ago
I have the same, i guess it is smslib's fault that it doesn't recreate the 
session!?

Original comment by ashaihul...@gmail.com on 4 Jun 2011 at 7:37

GoogleCodeExporter commented 8 years ago
Hi,

Yes it was the issue with  me as well,i was able to solve it by creating a new 
session

thank you lot guys.

Original comment by mohandez...@gmail.com on 17 Dec 2013 at 5:10

GoogleCodeExporter commented 8 years ago
mohandez...@gmail.com, could you specify in code how did you manage to create a 
new session and solve this problem?

Original comment by givicen...@gmail.com on 9 Jun 2014 at 11:54