-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receiver stops after a few hours with no traffic #34
Comments
Hello Toms, did you solve this problem? If yes, plz share the solution. |
Hi, yes I did. I located two different things. First of all the shutdown some times caused a deadlock. I therefore wrote a patch to JSMPP to gracefully shut down the JSMPP threads to avoid deadlock. Sometimes the two threads (enquirelink and pdusender) seemed to wait for eachother. This patch is included in the updated JSMPP release on this page: http://jsmpp.org/ In addition I wrote my own watchdog. This watchdog is using the SMPPSession object to check if the sessionstate equals SessionState.CLOSED. In the case of a clean shutdown or if the connection to the SMSC somehow is down I found that the SessionState always was CLOSED. When this happens I create a new SMPPSession object and let the old one go out of scope. Let me know if you have any more questions. |
Hello Tomas, thank you for quick response! This i get when i run AutoReconnect example [main] INFO org.jsmpp.session.SMPPSession - Connected Process finished with exit code 1 After ~1 minute connection is terminated with IOException while reading: Gateway gateway = new AutoReconnectGateway("localhost", 5555, On Mon, Apr 20, 2015 at 11:59 AM, Tomas Andersen [email protected]
Best Regards |
I havent tried running the example. Are you trying to set up a client or a server? I have successfully communicated with an SMSC as a client using this setup (deleted some private code and added some pseudocode but will give you an idea). I have a service object and a listener object. The service object has an additional method for sending text messages, the listener checks for incoming messages. I do not know why your example fails and unfortunately I have no time to check it out. Try to ask on this github page instead: https://github.com/opentelecoms-org/jsmpp public class MySmppListener implements MessageReceiverListener public class MySmppService
private void connectAndBind() |
Hi. I am using SMPSession.connectAndBind() to set up a receiver (using BindType.BIND_RX). I have also sender class which binds using BIND_TX. The sender class seems to work ok all the time but after a few hours with no active sending from my side it seems like the receiver stops. After adding the pull request #25 I get some additional logging. AbstractSession.close() called. Does anyone know if there is a timeout setting which takes down the connection actively? Or may this be a result of some error?
I can set up additional logging and start debugging but would be grateful if anyone have experienced anything similar and know why.
10:29:01.898 INFO [MyClass.java:403] - Last logging from my app
16:51:24.364 INFO [AbstractSession.java:203] - AbstractSession.close() called
16:51:24.864 INFO [AbstractSession.java:203] - AbstractSession.close() called
Thanks.
Tomas
The text was updated successfully, but these errors were encountered: