Hi,

Don't use devel for such questions.

To check if it is a resource socket problem, type:

netstat -a | grep 217.10.194.192  | wc -l

To get your open sockets when you have the problem. In linux you can increase that number from ulimits.conf. In Solaris with ndd.

But this is not the cause of your problem. The question is why are you disconnecting so often and keep building up connections?

You shouldn't be getting "connecting to Primary SMSC" during normal operation.

BR,
Nikos
----- Original Message ----- From: Bogdan Irimia
To: [email protected]
Sent: Tuesday, August 31, 2010 5:20 PM
Subject: UCP reconnection problem


Hello

I'm using Kannel 1.4.3 for its SMSC gateway.
I'm connecting to an SMSC with the EMI/UCP protocol. The configuration is the following:

group = smsc
smsc = emi
smsc-id = "myID"
preferred-smsc-id = "smscID"
host = xxx.xxx.xxx.xxx
port = 6001
our-port = 2878
receive-port = 1878
connect-allow-ip = 127.0.0.1
throughput = 5
keepalive = 50
(I tried without the keepalive, it's the same)

I have the following issue:
- connection works ok for a few days. When the connection is idle, I get these messages in the log:
2010-08-30 15:57:09 [2280] [7] DEBUG: EMI2[vodafone-8878]: clear_sent called
2010-08-30 15:57:09 [2280] [7] INFO: EMI2[vodafone-8878]: connecting to Primary SMSC

- after a while (couple of days) I get these errors:
2010-08-30 16:07:10 [2280] [7] INFO: EMI2[vodafone-8878]: Main connection closed by SMSC
2010-08-30 16:07:10 [2280] [7] DEBUG: EMI2[vodafone-8878]: clear_sent called
2010-08-30 16:07:10 [2280] [7] INFO: EMI2[vodafone-8878]: connecting to Primary SMSC
2010-08-30 16:07:31 [2280] [7] ERROR: connect failed
2010-08-30 16:07:31 [2280] [7] ERROR: System error 110: Connection timed out
2010-08-30 16:07:31 [2280] [7] ERROR: error connecting to server `217.10.194.192' at port `6001' 2010-08-30 16:07:31 [2280] [7] ERROR: EMI2[vodafone-8878]: opening TCP connection to 217.10.194.192 failed 2010-08-30 16:07:31 [2280] [7] ERROR: EMI2[vodafone-8878]: Couldn't connect to SMS center (retrying in 10 seconds).

- then every ten seconds I get these errors:
2010-08-30 16:07:41 [2280] [7] INFO: EMI2[vodafone-8878]: connecting to Primary SMSC
2010-08-30 16:08:02 [2280] [7] ERROR: connect failed
2010-08-30 16:08:02 [2280] [7] ERROR: System error 110: Connection timed out
2010-08-30 16:08:02 [2280] [7] ERROR: error connecting to server `217.10.194.192' at port `6001' 2010-08-30 16:08:02 [2280] [7] ERROR: EMI2[vodafone-8878]: opening TCP connection to 217.10.194.192 failed 2010-08-30 16:08:02 [2280] [7] ERROR: EMI2[vodafone-8878]: Couldn't connect to SMS center (retrying in 10 seconds).

The connection does not work afterwards. Even if I restart the application, the connection fails. The solution is to reboot the machine or to let the application closed for a while (half an hour, an hour, maybe more).

I made a trace with Wireshark, it seems that the problem with the reconnection is that kannel sends SYN tcp packet, the server responds with SYN,ACK and kannel does not continue with ACK tcp packet. But because the problem is being solved by a reboot, I'm thinking the problem is somewhere in resource (socket) management (releasing the socket, somehow).

Could you please help me?

Thank you!

Bogdan

Reply via email to