[SR-Users] tcpconn_main_timeout

Kjeld Flarup kjeld.flarup at liberalismen.dk
Sun Mar 18 12:59:28 CET 2018


With netstat I can see that there is an active tcp connection, while I 
get the tcpconn_main_timeout

netstat | grep 192.168.2.9:5070
tcp        0      0 192.168.2.9:5070 0x3e2c8655.mobile:34355 ESTABLISHED

Does this mean that Kamailio doesn't reuse this connection, and instead 
tries to establish a new one.

And is it possible to have two concurrent connections, especially when 
it is trying to send an invite to a client behind NAT.


-------------------- Med Liberalistiske Hilsner ----------------------
    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
    Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk

On 03/18/2018 04:13 AM, Sergiu Pojoga wrote:
> The subject is of interest to me as well.
>
> Topology is Kamailio acting as an edge proxy to a farm of Asterisk 
> boxes, proxy handles far-end NAT traversal, transport conversion from 
> UDP/TCP/TLS on the WAN to UDP only on the LAN towards Asterisk. 
> Keep-alive for endpoints on the Internet is achieved using Asterisk's 
> quality OPTIONS messages.
>
> The TCP error shows up rarely in the logs, at which time Asterisk's 
> quality OPTIONS messages stop being delivered to the far endpoint, 
> shortly after the peer goes OFFLINE. What's weird, say there's 60 IP 
> desk phones under the same far NAT, only occasionally (1-3 times a 
> day) some will experience the problem.
>
> What can be done to mitigate this problem? Tuning OS/Kamailio TCP 
> settings, lower UAC register times?
>
> Current TCP settings:
> tcp_connection_lifetime=3605
> tcp_send_timeout=3
> tcp_connect_timeout=5
> tcp_max_connections=4096
>
> Thanks.
>
> On Sat, Mar 17, 2018 at 5:45 AM, Kjeld Flarup 
> <kjeld.flarup at liberalismen.dk <mailto:kjeld.flarup at liberalismen.dk>> 
> wrote:
>
>     We are developing an app with a pjsip client.
>
>     I see this error when trying to send an invite from kamailio.
>
>     Mar 17 00:29:46 raspberrypi /usr/sbin/kamailio[18720]: ERROR:
>     <core> [tcp_main.c:4258]: tcpconn_main_timeout(): connect
>     62.44.134.85:43829 <http://62.44.134.85:43829> failed (timeout)
>
>     A few seconds before 62.44.134.85:43829
>     <http://62.44.134.85:43829> did a register.
>
>     I can understand that either the TCP connection was close by the
>     other end or no one is listening.
>
>     How much can I see in a pcap from this scenario? I cannot see the
>     invite, but somehow there must be some TCP communication to show
>     what is failing.
>
>
>
>     -- 
>     -------------------- Med Liberalistiske Hilsner ----------------------
>        Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min
>     tegnebog
>     Sofienlundvej 6B
>     <https://maps.google.com/?q=Sofienlundvej+6B&entry=gmail&source=g>,
>     7560 Hjerm, Tlf: 40 29 41 49
>        Den ikke akademiske hjemmeside for liberalismen -
>     www.liberalismen.dk <http://www.liberalismen.dk>
>
>
>     _______________________________________________
>     Kamailio (SER) - Users Mailing List
>     sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
>     https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>     <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180318/ce45cdd7/attachment.html>


More information about the sr-users mailing list