TCP connection not torn down if unbinding not properly done

TCP connection not torn down if unbinding not properly done SearchSearch
Author Message
patrick lee
New member
Username: Patricklee

Post Number: 8
Registered: 06-2004
Posted on Thursday, March 17, 2005 - 09:59 am:   

Dear Bryce and all,

I am not sure if you have experienced this before. Two PC are installed with NowSMS. One PC (as smpp client) binds to the other PC. The smpp binding is fine. But if I disconnect the network cable of client without proper unbinding, the server will still see a TCP connection "established" and it stays forever.

Same thing occured if I disconnect connection on server side, type netstat -n in client PC still see the TCP connection stays forever, even I reconnect the cable again.

The actual connection is no longer there but the device still see the connection "established". I believe this is not only a bug in nowsms. I have tried another open smpp client connected to a logica SMSC and got the same problem.

I was told that it was smpp bug and I think it is quite a common known issue. Anybody has more information on this ? Kindly share with me, thanks.

Patrick
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 4245
Registered: 10-2002
Posted on Monday, March 28, 2005 - 09:20 pm:   

Hi Patrick,

Normally the "enquire link" command is used in SMPP environments to avoid this type of problem. If the server doesn't see an enquire link within a timeout period, then it disconnects the client.

Similarly, if the client doesn't get a response to its enquire link, then it terminates its end of the connection.

-bn
patrick lee
New member
Username: Patricklee

Post Number: 9
Registered: 06-2004
Posted on Tuesday, March 29, 2005 - 06:26 am:   

Dear Bryce,

Thanks. I know the "enquire link" in smpp, but does NowSMS employ enquire link ? And are those parameters configurable ?

I do have one more problem. I found that the smpp connection is quite sensitive. Little network interrupt (around 3 sec) between smpp client and server will result in a connection drop. But I found other tcp connection such as telnet and ftp could tolerate such distrubance.

Is it due to the smpp enquire link exchanging too frequent thus making the connection timed out so soon ? Or is the connection dropped by the time out in TCP layer ?

Is there some ways to fine tune the parameters in
smpp (particularly on enquire link parameter) to increase the tolerance ? Thanks.

Patrick
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 4266
Registered: 10-2002
Posted on Wednesday, March 30, 2005 - 10:33 pm:   

Patrick,

Currently we only support enquire link when we are the SMPP client. (The time value is set in the advanced settings parameters for the connection.)

We do not support it when we are the SMPP server (well, we support clients sending the enquire link command, and respond to it properly, but we do not enforce it). We will be adding support for this in the next major release.

A network interruption should only cause a problem if there is data that is being sent/received at that time. If there is no data being sent/received during the interruption, then TCP can recover quite easily.

Generally it is an SMPP client that sends enquire link commands. And the timing is configurable in the SMPP client.

Servers also will have a setting for this. But the server setting is just for enforcing it. Basically, a server might say that it requires an enquire link every 60 seconds. What this means is that a client must send some type of request every 60 seconds (including enquire link), or it will be disconnected.

But ultimately it is the client that decides how often to send an enquire link. I've encountered some service providers that want the client to send an enquire link every 10 seconds, which is a bit overkill in my book.

-bn