[OpenSIPS-Users] Opensips crashes on forward when destination port is unreachable
Adam Kuśmirek
amkusmirek at gmail.com
Fri Apr 29 10:11:51 CEST 2011
Hi All
I need to implement Stateless Proxy to translate transport from TLS to TCP.
I have simple routing script:
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if(dst_ip == 10.0.10.11) {
log("message received on external interface\n");
force_send_socket(tcp:10.0.20.11:5060);
forward("tcp:10.0.20.101:5060");
};
if(dst_ip == 10.0.20.11) {
log("message received on internal interface\n");
force_send_socket(tls:10.0.10.11:5061);
forward("tls:10.0.10.101:5061");
};
}
I'm generating traffic shown on picture below:
---------- ------------------
-----------
| UAC | <-------------> | SL Proxy | <-------------> | UAS |
---------- TLS ------------------ TCP -----------
10.0.10.101 10.0.10.11 10.0.20.11 10.0.20.101
UAC (10.0.10.101) via TLS to external Proxy interface (10.0.10.11)
FORWARD via internal Proxy interface (10.0.20.11) TCP to UAS
(10.0.20.101)
Everything works fine until destination port is unreachable.
When I shutdown UAS (destination port becomes unreachable) Opensips crashes
and produces log:
Apr 28 08:26:47 hmsa /usr/sbin/opensips[2799]:
INFO:core:tls_accept:client did not present a certificate
Apr 28 08:26:47 hmsa /usr/sbin/opensips[2799]:
ERROR:core:tcp_blocking_connect: poll error: flags 18
Apr 28 08:26:47 hmsa /usr/sbin/opensips[2799]:
ERROR:core:tcp_blocking_connect: failed to retrieve SO_ERROR (111)
Connection refused
Apr 28 08:26:47 hmsa /usr/sbin/opensips[2799]:
ERROR:core:tcpconn_connect: tcp_blocking_connect failed
Apr 28 08:26:47 hmsa /usr/sbin/opensips[2799]: ERROR:core:tcp_send:
connect failed
Apr 28 08:26:47 hmsa /usr/sbin/opensips[2799]: ERROR:core:msg_send:
tcp_send failed
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2803]:
CRITICAL:core:receive_fd: EOF on 11
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2794]: INFO:core:handle_sigs:
child process 2799 exited by a signal 11
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2794]: INFO:core:handle_sigs:
core was generated
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2794]: INFO:core:handle_sigs:
terminating due to SIGCHLD
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2803]: INFO:core:sig_usr:
signal 15 received
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2796]: INFO:core:sig_usr:
signal 15 received
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2802]: INFO:core:sig_usr:
signal 15 received
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2801]: INFO:core:sig_usr:
signal 15 received
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2800]: INFO:core:sig_usr:
signal 15 received
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2798]: INFO:core:sig_usr:
signal 15 received
Apr 28 08:26:48 hmsa /usr/sbin/opensips[2797]: INFO:core:sig_usr:
signal 15 received
I'm using Opensips version 1.6.3 maintained in EPEL repository
[root at hmsa ~]# opensips -V
version: opensips 1.6.3-tls (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE,
USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: unknown
@(#) $Id: main.c 6169 2009-09-22 12:48:37Z bogdan_iancu $
main.c compiled on 22:39:11 Dec 22 2010 with gcc 4.1.2
I compiled the latest 1.6.4 release and have the same problem.
Is it bug ?
Please help
Regards Adam
More information about the Users
mailing list