Dear Nikos

Thank you for your reply.
As I stated in the message, there is not a number of sockets issue, but an issue regarding the state of the socket. The state the socket is in is SYN SENT, and even if SYN ACK message is sent back by SMSC (checket with Wireshark/tcpdump), Kannel does not send ACK. So it's not about the limits in ulimit.conf, it's an issue at socket protocol implementation.
Netstat gives the following output (not wc, of course):
tcp        0      1 93.113.15.3:2878        217.10.194.192:x11-1    SYN_SENT


Regards,
Bogdan

--------------------------------------------------
From: "Nikos Balkanas" <nbalka...@gmail.com>
Sent: Monday, September 06, 2010 2:20 PM
To: "Bogdan Irimia" <bog...@digitair.ro>; <users@kannel.org>
Subject: Re: Issue with UCP - reconnection problem

Hi,

I remember replying to you again.

1) No, it is not normal to close and open connections every time you have to send an SMS. In fact it wastes a lot of resources (sockets and CPU). Talk to VF, it is their issue.

2) Type:

netstat -a | grep <vodafone-ip> | wc -l

when having a problem. See if you are running low on sockets. See in what state they are left. If they are not closing sockets properly talk again to VF. In linux you can increase limit in ulimit.conf. In solaris use ndi. This (limits) is not a kannel issue but an OS one.

Finally if they don't clean up their act, try to restart kannel every 24 hrs from cron.

I hope i don't have to reply again about the same thing.

BR,
Nikos
----- Original Message ----- From: Bogdan Irimia
To: users@kannel.org
Sent: Monday, September 06, 2010 12:06 PM
Subject: Issue with UCP - reconnection problem


Hello

I'm reposting this same issue: I have a problem with the UCP connection:
- during "normal" operation, I get these messages every 10 minutes:
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 I suppose this is because the SMSC closes connection after 10 minutes of inactivity (according to Vodafone, with whom we are testing). I configured the account with keepalive = 50 but no improvement. But I am able to send and receive messages normally.
- after a while (2 or 3 days) I get these messages in the log:
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).
During these messages, the port is in this state (using netstat):
tcp 0 1 93.113.15.3:2878 217.10.194.192:x11-1 SYN_SENT Also, with Wireshark I noticed that Kannel sends SYN packet to server port, the server returns SYN ACK, but Kannel does not return ACK. Thus, the connection isn't made successful.

So there are two questions:
- is it true that an UCP client should only connect when sending a message? during inactivity, connection can be closed, and any incoming messages could be received using receive-port? - why does Kannel fails to reconnect after a while, due to failing in sending ACK message back to connecting port?

Thank you!


Reply via email to