Reconnection Problem after some days of running application

.NET library for SMPP protocol
Locked
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Reconnection Problem after some days of running application

Post by majortargets » Sun Aug 21, 2011 12:21 pm

Hi Alt,

I do get below error when the application runs for some time. I do have to stop and restart the application before it could work again.

8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: SmppClient disconnected
8/19/2011 6:33:44 PM: reconnect...
8/19/2011 6:33:44 PM: SmppClient connected
8/19/2011 6:33:44 PM: reconnect...


8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: ERROR:Application exception
8/20/2011 12:18:38 AM: SmppClient disconnected
8/20/2011 12:18:38 AM: Binding SmppClient for SystemId: fmobile
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: connect: An invalid argument was supplied
8/20/2011 12:18:38 AM: Binding SmppClient for SystemId: fmobile
alt
Site Admin
Posts: 918
Joined: Tue Apr 25, 2006 9:45 am

Re: Reconnection Problem after some days of running applicat

Post by alt » Sun Aug 21, 2011 7:38 pm

could you post here what was before first reconnect?
it seems that evDisconnected was raised several times.
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Re: Reconnection Problem after some days of running applicat

Post by majortargets » Mon Aug 22, 2011 4:39 am

Hi alt,

below is the log before the one i sent. Normal log without error should display first for lines repeatedly.

............................................client_evDisconnected code
Private Sub client_evDisconnected(ByVal sender As Object)
AddToLog("SmppClient disconnected")
Reconnect()
End Sub
..............................................reconnect code
Private Sub Reconnect()
While Not client.Connected
Connect()
Thread.Sleep(10000)
AddToLog("reconnect...")
End While
End Sub

---------------------------------------------------log
8/19/2011 2:43:32 PM: Message Sent 0
8/19/2011 2:43:32 PM: completed!
8/19/2011 2:43:35 PM: Message Sent 0
8/19/2011 2:43:35 PM: completed!
8/19/2011 2:43:38 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 2:43:38 PM: SmppClient disconnected
8/19/2011 2:43:38 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 2:43:38 PM: Message Sent 0
8/19/2011 2:43:38 PM: SmppClient disconnected
8/19/2011 2:43:38 PM: completed!
8/19/2011 2:43:39 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 2:43:39 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 2:43:39 PM: SmppClient disconnected
8/19/2011 2:43:39 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 2:43:39 PM: SmppClient disconnected
8/19/2011 2:43:39 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 2:43:39 PM: ERROR:Connection error
8/19/2011 2:43:39 PM: SmppClient connected
8/19/2011 2:43:39 PM: SmppClient bound : system is KSMSC5 with status ESME_ROK
8/19/2011 2:43:40 PM: reconnect...
8/19/2011 2:43:40 PM: reconnect...
8/19/2011 2:43:40 PM: reconnect...
8/19/2011 2:43:42 PM: Message Sent 1
8/19/2011 2:43:42 PM: completed!
8/19/2011 2:43:46 PM: Message Sent 0
8/19/2011 2:43:46 PM: completed!
.
.
.
.
.
.
.
8/19/2011 4:25:31 PM: Message Sent 0
8/19/2011 4:25:31 PM: completed!
8/19/2011 4:25:34 PM: Message Sent 0
8/19/2011 4:25:34 PM: completed!
8/19/2011 4:25:37 PM: Message Sent 0
8/19/2011 4:25:37 PM: completed!
8/19/2011 4:25:40 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 4:25:40 PM: SmppClient disconnected
8/19/2011 4:25:40 PM: SmppClient disconnected
8/19/2011 4:25:40 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 4:25:40 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:40 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 4:25:40 PM: SmppClient connected
8/19/2011 4:25:40 PM: Bad status returned during Bind : BindTransceiverResp with status ESME_RBINDFAIL
8/19/2011 4:25:40 PM: SmppClient disconnected
8/19/2011 4:25:40 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:40 PM: SmppClient connected
8/19/2011 4:25:40 PM: Bad status returned during Bind : BindTransceiverResp with status ESME_RBINDFAIL
8/19/2011 4:25:40 PM: SmppClient disconnected
8/19/2011 4:25:40 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:40 PM: Message Sent 0
8/19/2011 4:25:40 PM: SmppClient connected
8/19/2011 4:25:40 PM: Bad status returned during Bind : BindTransceiverResp with status ESME_RBINDFAIL
8/19/2011 4:25:40 PM: SmppClient disconnected
8/19/2011 4:25:40 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:41 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:41 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:41 PM: completed!
8/19/2011 4:25:41 PM: SmppClient connected
8/19/2011 4:25:41 PM: SmppClient disconnected
8/19/2011 4:25:41 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:41 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:41 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 4:25:41 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 4:25:41 PM: SmppClient connected
8/19/2011 4:25:41 PM: SmppClient disconnected
8/19/2011 4:25:41 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:41 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: connect: Sending failed. Client disconnected
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: SmppClient connected
8/19/2011 4:25:42 PM: SmppClient disconnected
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 4:25:42 PM: SmppClient disconnected
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:42 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 4:25:43 PM: SmppClient disconnected
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 4:25:43 PM: SmppClient disconnected
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:43 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: ERROR:EnquireLink did not receive correct response
8/19/2011 4:25:44 PM: SmppClient disconnected
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:44 PM: SmppClient connected
8/19/2011 4:25:44 PM: SmppClient disconnected
8/19/2011 4:25:44 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: SmppClient connected
8/19/2011 4:25:45 PM: SmppClient disconnected
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:45 PM: ERROR:Application exception
8/19/2011 4:25:45 PM: SmppClient disconnected
8/19/2011 4:25:45 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: SmppClient connected
8/19/2011 4:25:46 PM: SmppClient disconnected
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:46 PM: SmppClient connected
8/19/2011 4:25:46 PM: SmppClient disconnected
8/19/2011 4:25:46 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: connect: An invalid argument was supplied
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: ERROR:Application exception
8/19/2011 4:25:47 PM: SmppClient disconnected
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:47 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 4:25:47 PM: ERROR:Connection error. Error Code: 10022.
8/19/2011 4:25:47 PM: SmppClient connected
8/19/2011 4:25:47 PM: SmppClient disconnected
8/19/2011 4:25:47 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: SmppClient connected
8/19/2011 4:25:48 PM: SmppClient disconnected
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:48 PM: ERROR:Application exception
8/19/2011 4:25:48 PM: SmppClient disconnected
8/19/2011 4:25:48 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: connect: Sending failed. Client disconnected
8/19/2011 4:25:49 PM: SmppClient connected
8/19/2011 4:25:49 PM: SmppClient disconnected
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:49 PM: ERROR:Application exception
8/19/2011 4:25:49 PM: SmppClient disconnected
8/19/2011 4:25:49 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:50 PM: Binding SmppClient for SystemId: fmobile
8/19/2011 4:25:50 PM: Binding SmppClient for SystemId: fmobile
alt
Site Admin
Posts: 918
Joined: Tue Apr 25, 2006 9:45 am

Re: Reconnection Problem after some days of running applicat

Post by alt » Wed Aug 24, 2011 2:50 pm

do you use multiple bind to one server?
Or multiple Binding in log appears after first disconnect?
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Re: Reconnection Problem after some days of running applicat

Post by majortargets » Fri Feb 24, 2012 10:42 am

Sorry for just replying this message. I have multiple binds to one server i.e same IP and same port
Gaska
Posts: 4
Joined: Mon Jan 30, 2012 3:21 pm

Re: Reconnection Problem after some days of running applicat

Post by Gaska » Wed Aug 01, 2012 11:43 pm

Hi Alt,

Am having the same problem so i will be glade if you let me know how i can handle that. This is really causing me much since i have to restart the application from time to time which is not good for my business.

Thanks waiting 4 ya response
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Re: Reconnection Problem after some days of running applicat

Post by majortargets » Thu Aug 02, 2012 1:14 am

Use .bind instead of asyn bind. It might help
Locked