THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has been changed. The changes are listed below. For full information
about what has changed, visit the URL and click the History tab.
FS#136 - tcp_connect_timeout has no effect
User who did this: IƱaki Baz Castillo (ibc)
Task details edited:
-------
It seems that tcp_connect_timeout has no effect at all. I set it to 3 seconds and try
sending a request with RURI "sip:lalalala@91.121.79.216:7777;transport=tcp". The
server 91.121.79.216 refuses the TCP connection (REJECT action in iptables rather than
DROP), try yourself:
---------------
~# telnet 91.121.79.216 7777
Trying 91.121.79.216...
telnet: Unable to connect to remote host: Connection refused
---------------
However when my Kamailio tries to open a TCP connection with such destination, it produces
a local 408 after 30 seconds (fr_timer = 30000)!
Since Kamailio should detect that the TCP connection is rejected, I expect that it should
generate a local 503 for the client transaction as RFC 3261 states.
I attach a file kamailio-tcp-reject.log which shows the issue. It clearly shows that tcp
connection attemp fails inmediately (due to TCP reject) but it does not terminate the
client transaction and instead it takes 30 seconds until it generates local 408:
-----------------
Jun 15 12:40:51 kamailio[7275]: ERROR: <core> [tcp_main.c:4137]: connect
91.121.79.216:7777 failed
Jun 15 12:41:21 kamailio[7270]: DEBUG: tm [t_reply.c:1132]:
->>>>>>>>> T_code=100, new_code=408
-----------------
I've also tested sending a TCP INVITE to a host which is not reachable (1.2.3.4) so
TCP timeouts occurs (after 5 seconds rather than 3 however...) but as in the other case,
such TCP timeout does not terminate the client transaction and instead local 408 is
generated after 30 seconds (I attach kamailio-tcp-timeout.log):
------------------
Jun 15 12:42:23 kamailio[7338]: DEBUG: <core> [io_wait.h:390]: DBG:
io_watch_add(0x890f60, 18, 2, 0x7fae6c97d278), fd_no=10
Jun 15 12:42:28 kamailio[7338]: DEBUG: <core> [tcp_main.c:4304]: tcp_main: entering
timer for 0x7fae6c97d278 (ticks=1376168512, timeout=1376170384 (117 s),
wr_timeout=1376168512 (0 s)), write queue: 940 bytes
Jun 15 12:42:28 kamailio[7338]: ERROR: <core> [tcp_main.c:4322]: connect
1.2.3.4:5060 failed (timeout)
Jun 15 12:42:28 kamailio[7338]: DEBUG: <core> [tcp_main.c:4346]: tcp_main: timeout
for 0x7fae6c97d278
Jun 15 12:42:28 kamailio[7338]: DEBUG: <core> [io_wait.h:617]: DBG: io_watch_del
(0x890f60, 18, -1, 0x10) fd_no=11 called
Jun 15 12:42:53 kamailio[7333]: DEBUG: tm [t_reply.c:1132]:
->>>>>>>>> T_code=100, new_code=408
------------------
Kamailio info:
version: kamailio 3.2.0-dev5 (x86_64/linux) 552425
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 552425
compiled on 09:46:21 Jun 15 2011 with gcc 4.5.2
-------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=136
You are receiving this message because you have requested it from the Flyspray bugtracking
system. If you did not expect this message or don't want to receive mails in future,
you can change your notification settings at the URL shown above.