Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion?
On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
Hello,
does registration over UDP work fine? Are these messages for tcp or tls connections?
Can you paste the output of 'kamctl ps'?
Cheers, Daniel
On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion?
On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz <ramazan.cs@gmail.com mailto:ramazan.cs@gmail.com> wrote:
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog: Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17 What could be the problem? Any suggestion? In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
These messages are for tls. When switched to TCP, it works fine. What can be the problem?
On Wed, Oct 31, 2012 at 3:39 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
does registration over UDP work fine? Are these messages for tcp or tls connections?
Can you paste the output of 'kamctl ps'?
Cheers, Daniel
On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion?
On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
And the output of 'kamctl ps' is as following (after changing back to tls):
Process:: ID=0 PID=5621 Type=attendant Process:: ID=1 PID=5622 Type=slow timer Process:: ID=2 PID=5623 Type=timer Process:: ID=3 PID=5624 Type=MI FIFO Process:: ID=4 PID=5625 Type=ctl handler Process:: ID=5 PID=5626 Type=MI DATAGRAM Process:: ID=6 PID=5627 Type=TIMER NH Process:: ID=7 PID=5628 Type=tcp main process
And the new error lines in syslog for the processes above are, Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 5621) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f215351b588 (flags 0x4018), fd 17
On Wed, Oct 31, 2012 at 5:04 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
These messages are for tls. When switched to TCP, it works fine. What can be the problem?
On Wed, Oct 31, 2012 at 3:39 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
does registration over UDP work fine? Are these messages for tcp or tls connections?
Can you paste the output of 'kamctl ps'?
Cheers, Daniel
On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion?
On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
Is this all the output of kamctl ps? Because there is no udp or tcp worker process. If yes, then is something wrong with your config, be sure you set proper children parameter value.
Cheers, Daniel
On 10/31/12 4:53 PM, Ramazan Yilmaz wrote:
And the output of 'kamctl ps' is as following (after changing back to tls):
Process:: ID=0 PID=5621 Type=attendant Process:: ID=1 PID=5622 Type=slow timer Process:: ID=2 PID=5623 Type=timer Process:: ID=3 PID=5624 Type=MI FIFO Process:: ID=4 PID=5625 Type=ctl handler Process:: ID=5 PID=5626 Type=MI DATAGRAM Process:: ID=6 PID=5627 Type=TIMER NH Process:: ID=7 PID=5628 Type=tcp main process
And the new error lines in syslog for the processes above are, Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 5621) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f215351b588 (flags 0x4018), fd 17
On Wed, Oct 31, 2012 at 5:04 PM, Ramazan Yilmaz <ramazan.cs@gmail.com mailto:ramazan.cs@gmail.com> wrote:
These messages are for tls. When switched to TCP, it works fine. What can be the problem? On Wed, Oct 31, 2012 at 3:39 PM, Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> wrote: Hello, does registration over UDP work fine? Are these messages for tcp or tls connections? Can you paste the output of 'kamctl ps'? Cheers, Daniel On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion? On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz <ramazan.cs@gmail.com <mailto:ramazan.cs@gmail.com>> wrote: Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog: Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17 What could be the problem? Any suggestion? In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules. _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 -http://asipto.com/u/katu
I swithced again to tcp, and 'kamctl ps' now gives the following:
Process:: ID=0 PID=5913 Type=attendant Process:: ID=1 PID=5914 Type=slow timer Process:: ID=2 PID=5915 Type=timer Process:: ID=3 PID=5916 Type=MI FIFO Process:: ID=4 PID=5917 Type=ctl handler Process:: ID=5 PID=5918 Type=MI DATAGRAM Process:: ID=6 PID=5919 Type=TIMER NH Process:: ID=7 PID=5920 Type=tcp receiver (generic) child=0 Process:: ID=8 PID=5921 Type=tcp receiver (generic) child=1 Process:: ID=9 PID=5922 Type=tcp receiver (generic) child=2 Process:: ID=10 PID=5923 Type=tcp receiver (generic) child=3 Process:: ID=11 PID=5924 Type=tcp main process
So it seems ok for TCP, right?
The only modification I made while switching from TLS to TCP is to change the listen=... directive (and disabling tls module parameters, of course) in kamailio.cfg file. So I do not make any change on children parameter value while switching to TCP, i.e. I have the following lines in kamailio.cfg
fork=yes children=4
Any suggestion?
On Wed, Oct 31, 2012 at 6:18 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Is this all the output of kamctl ps? Because there is no udp or tcp worker process. If yes, then is something wrong with your config, be sure you set proper children parameter value.
Cheers, Daniel
On 10/31/12 4:53 PM, Ramazan Yilmaz wrote:
And the output of 'kamctl ps' is as following (after changing back to tls):
Process:: ID=0 PID=5621 Type=attendant Process:: ID=1 PID=5622 Type=slow timer Process:: ID=2 PID=5623 Type=timer Process:: ID=3 PID=5624 Type=MI FIFO Process:: ID=4 PID=5625 Type=ctl handler Process:: ID=5 PID=5626 Type=MI DATAGRAM Process:: ID=6 PID=5627 Type=TIMER NH Process:: ID=7 PID=5628 Type=tcp main process
And the new error lines in syslog for the processes above are, Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 5621) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f215351b588 (flags 0x4018), fd 17
On Wed, Oct 31, 2012 at 5:04 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
These messages are for tls. When switched to TCP, it works fine. What can be the problem?
On Wed, Oct 31, 2012 at 3:39 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
does registration over UDP work fine? Are these messages for tcp or tls connections?
Can you paste the output of 'kamctl ps'?
Cheers, Daniel
On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion?
On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
What is the listen parameter for tls?
IIRC, UDP is mandatory, you should have some workers for it, even you reject the traffic on it.
The default config file has TLS support inside, just enable:
#!define WITH_TLS
and then test with it to see if you can connect. If yes, compare with your config to see what you did wrong.
Cheers, Daniel
On 10/31/12 6:12 PM, Ramazan Yilmaz wrote:
I swithced again to tcp, and 'kamctl ps' now gives the following:
Process:: ID=0 PID=5913 Type=attendant Process:: ID=1 PID=5914 Type=slow timer Process:: ID=2 PID=5915 Type=timer Process:: ID=3 PID=5916 Type=MI FIFO Process:: ID=4 PID=5917 Type=ctl handler Process:: ID=5 PID=5918 Type=MI DATAGRAM Process:: ID=6 PID=5919 Type=TIMER NH Process:: ID=7 PID=5920 Type=tcp receiver (generic) child=0 Process:: ID=8 PID=5921 Type=tcp receiver (generic) child=1 Process:: ID=9 PID=5922 Type=tcp receiver (generic) child=2 Process:: ID=10 PID=5923 Type=tcp receiver (generic) child=3 Process:: ID=11 PID=5924 Type=tcp main process
So it seems ok for TCP, right?
The only modification I made while switching from TLS to TCP is to change the listen=... directive (and disabling tls module parameters, of course) in kamailio.cfg file. So I do not make any change on children parameter value while switching to TCP, i.e. I have the following lines in kamailio.cfg
fork=yes children=4
Any suggestion?
On Wed, Oct 31, 2012 at 6:18 PM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Is this all the output of kamctl ps? Because there is no udp or tcp worker process. If yes, then is something wrong with your config, be sure you set proper children parameter value. Cheers, Daniel On 10/31/12 4:53 PM, Ramazan Yilmaz wrote:
And the output of 'kamctl ps' is as following (after changing back to tls): Process:: ID=0 PID=5621 Type=attendant Process:: ID=1 PID=5622 Type=slow timer Process:: ID=2 PID=5623 Type=timer Process:: ID=3 PID=5624 Type=MI FIFO Process:: ID=4 PID=5625 Type=ctl handler Process:: ID=5 PID=5626 Type=MI DATAGRAM Process:: ID=6 PID=5627 Type=TIMER NH Process:: ID=7 PID=5628 Type=tcp main process And the new error lines in syslog for the processes above are, Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 5621) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f215351b588 (flags 0x4018), fd 17 On Wed, Oct 31, 2012 at 5:04 PM, Ramazan Yilmaz <ramazan.cs@gmail.com <mailto:ramazan.cs@gmail.com>> wrote: These messages are for tls. When switched to TCP, it works fine. What can be the problem? On Wed, Oct 31, 2012 at 3:39 PM, Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> wrote: Hello, does registration over UDP work fine? Are these messages for tcp or tls connections? Can you paste the output of 'kamctl ps'? Cheers, Daniel On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion? On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz <ramazan.cs@gmail.com <mailto:ramazan.cs@gmail.com>> wrote: Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog: Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17 What could be the problem? Any suggestion? In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules. _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 -http://asipto.com/u/katu
-- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 -http://asipto.com/u/katu
In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration:
listen=tls:XX.XX.XXX.XX:5061
#!ifdef WITH_TLS enable_tls=yes #!endif
#!ifdef WITH_TLS loadmodule "tls.so" #!endif
#!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif
And my tls.cfg is,
[server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem
[client:default] verify_certificate = yes require_certificate = yes
I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio.
It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps.
Best,
On Thu, Nov 1, 2012 at 2:44 PM, Daniel-Constantin Mierla miconda@gmail.comwrote:
What is the listen parameter for tls?
IIRC, UDP is mandatory, you should have some workers for it, even you reject the traffic on it.
The default config file has TLS support inside, just enable:
#!define WITH_TLS
and then test with it to see if you can connect. If yes, compare with your config to see what you did wrong.
Cheers, Daniel
On 10/31/12 6:12 PM, Ramazan Yilmaz wrote:
I swithced again to tcp, and 'kamctl ps' now gives the following:
Process:: ID=0 PID=5913 Type=attendant Process:: ID=1 PID=5914 Type=slow timer Process:: ID=2 PID=5915 Type=timer Process:: ID=3 PID=5916 Type=MI FIFO Process:: ID=4 PID=5917 Type=ctl handler Process:: ID=5 PID=5918 Type=MI DATAGRAM Process:: ID=6 PID=5919 Type=TIMER NH Process:: ID=7 PID=5920 Type=tcp receiver (generic) child=0 Process:: ID=8 PID=5921 Type=tcp receiver (generic) child=1 Process:: ID=9 PID=5922 Type=tcp receiver (generic) child=2 Process:: ID=10 PID=5923 Type=tcp receiver (generic) child=3 Process:: ID=11 PID=5924 Type=tcp main process
So it seems ok for TCP, right?
The only modification I made while switching from TLS to TCP is to change the listen=... directive (and disabling tls module parameters, of course) in kamailio.cfg file. So I do not make any change on children parameter value while switching to TCP, i.e. I have the following lines in kamailio.cfg
fork=yes children=4
Any suggestion?
On Wed, Oct 31, 2012 at 6:18 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Is this all the output of kamctl ps? Because there is no udp or tcp worker process. If yes, then is something wrong with your config, be sure you set proper children parameter value.
Cheers, Daniel
On 10/31/12 4:53 PM, Ramazan Yilmaz wrote:
And the output of 'kamctl ps' is as following (after changing back to tls):
Process:: ID=0 PID=5621 Type=attendant Process:: ID=1 PID=5622 Type=slow timer Process:: ID=2 PID=5623 Type=timer Process:: ID=3 PID=5624 Type=MI FIFO Process:: ID=4 PID=5625 Type=ctl handler Process:: ID=5 PID=5626 Type=MI DATAGRAM Process:: ID=6 PID=5627 Type=TIMER NH Process:: ID=7 PID=5628 Type=tcp main process
And the new error lines in syslog for the processes above are, Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 5621) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 31 16:52:14 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[5628]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f215351b588 (flags 0x4018), fd 17
On Wed, Oct 31, 2012 at 5:04 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
These messages are for tls. When switched to TCP, it works fine. What can be the problem?
On Wed, Oct 31, 2012 at 3:39 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
does registration over UDP work fine? Are these messages for tcp or tls connections?
Can you paste the output of 'kamctl ps'?
Cheers, Daniel
On 10/30/12 5:32 PM, Ramazan Yilmaz wrote:
Any ideas? It really seems as a bug, as the logs say. But do you have any workaround suggestion?
On Mon, Oct 29, 2012 at 11:09 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Hi, I installed kamailio 3.2.x a few times before and they were really fine. I decided to install a fresh one and followed the instructions on http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem: clients cannot register to kamailio. Each registration attempt produces the following error in the syslog:
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file descriptor Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0 (pid 0, no 0) Bad file descriptor [9] Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: : <core> [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56: Bad file descriptor (9) Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR: <core> [tcp_main.c:4006]: ERROR: send2child: send_fd failed for 0x7f510bc41588 (flags 0x4018), fd 17
What could be the problem? Any suggestion?
In case you need, the server is ubuntu server 11.10, and I installed including mysql and tls modules.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration:
listen=tls:XX.XX.XXX.XX:5061
#!ifdef WITH_TLS enable_tls=yes #!endif
#!ifdef WITH_TLS loadmodule "tls.so" #!endif
#!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif
And my tls.cfg is,
[server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem
[client:default] verify_certificate = yes require_certificate = yes
I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio.
It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps.
Best,
Any idea? I have shared my tls configuration with you in my previous post, and as I said, that configuration works with kamailio 3.2.4. After silence of 4 days, do you confirm that it is a bug? If so, how can it be solved? Any suggestion?
On Thu, Nov 1, 2012 at 4:23 PM, Ramazan Yilmaz ramazan.cs@gmail.com wrote:
In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration:
listen=tls:XX.XX.XXX.XX:5061
#!ifdef WITH_TLS enable_tls=yes #!endif
#!ifdef WITH_TLS loadmodule "tls.so" #!endif
#!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif
And my tls.cfg is,
[server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem
[client:default] verify_certificate = yes require_certificate = yes
I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio.
It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps.
Best,
Hello,
can you put also:
listen=tcp:127.0.0.1:5060
?
Cheers, Daniel
On Mon, Nov 5, 2012 at 9:31 AM, Ramazan Yilmaz ramazan.cs@gmail.com wrote:
Any idea? I have shared my tls configuration with you in my previous post, and as I said, that configuration works with kamailio 3.2.4. After silence of 4 days, do you confirm that it is a bug? If so, how can it be solved? Any suggestion?
On Thu, Nov 1, 2012 at 4:23 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration:
listen=tls:XX.XX.XXX.XX:5061
#!ifdef WITH_TLS enable_tls=yes #!endif
#!ifdef WITH_TLS loadmodule "tls.so" #!endif
#!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif
And my tls.cfg is,
[server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem
[client:default] verify_certificate = yes require_certificate = yes
I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio.
It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps.
Best,
Keeping listen=tls...., I also included "listen=tcp:127.0.0.1:5060". On restart it says,
Listening on tcp: 127.0.0.1:5060 tls: XX.XX.XX.XX [XX.XX.XX.XX]:5061 Aliases: *: XX.XX.XX.XX:*
kamailio started.
And now kamctl ps gives,
Process:: ID=0 PID=931 Type=attendant Process:: ID=1 PID=933 Type=slow timer Process:: ID=2 PID=934 Type=timer Process:: ID=3 PID=935 Type=MI FIFO Process:: ID=4 PID=936 Type=ctl handler Process:: ID=5 PID=937 Type=MI DATAGRAM Process:: ID=6 PID=938 Type=TIMER NH Process:: ID=7 PID=939 Type=tcp receiver (generic) child=0 Process:: ID=8 PID=940 Type=tcp receiver (generic) child=1 Process:: ID=9 PID=941 Type=tcp receiver (generic) child=2 Process:: ID=10 PID=942 Type=tcp receiver (generic) child=3 Process:: ID=11 PID=943 Type=tcp main process
And, now I can register to kamailio :) No error is written in syslog. An interesting workaround... Is this normal? i.e. is listening on a tcp port mandatory?
On Mon, Nov 5, 2012 at 12:03 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
can you put also:
listen=tcp:127.0.0.1:5060
?
Cheers, Daniel
On Mon, Nov 5, 2012 at 9:31 AM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Any idea? I have shared my tls configuration with you in my previous post, and as I said, that configuration works with kamailio 3.2.4. After silence of 4 days, do you confirm that it is a bug? If so, how can it be solved? Any suggestion?
On Thu, Nov 1, 2012 at 4:23 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration:
listen=tls:XX.XX.XXX.XX:5061
#!ifdef WITH_TLS enable_tls=yes #!endif
#!ifdef WITH_TLS loadmodule "tls.so" #!endif
#!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif
And my tls.cfg is,
[server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem
[client:default] verify_certificate = yes require_certificate = yes
I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio.
It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps.
Best,
-- Daniel-Constantin Mierla http://www.asipto.com
TLS is a security layer in top of TCP, so apparently tcp has to be specified as a listening transport layer to make tls work. Starting with v3.0.0, tls code is in a module, so the core might not initialize tcp if it does not have afferent sockets. Not sure what would take to make it work with tls only sockets - but definitely is no impact on resources, because the worker processes are the same for tcp and tls.
You can forbid tcp traffic from config file:
if(proto=TCP) { send_repply("403", "Not allowed"); exit; }
Cheers, Daniel
On 11/5/12 11:18 AM, Ramazan Yilmaz wrote:
Keeping listen=tls...., I also included "listen=tcp:127.0.0.1:5060 http://127.0.0.1:5060". On restart it says,
Listening on tcp: 127.0.0.1:5060 http://127.0.0.1:5060 tls: XX.XX.XX.XX [XX.XX.XX.XX]:5061 Aliases: *: XX.XX.XX.XX:*
kamailio started.
And now kamctl ps gives,
Process:: ID=0 PID=931 Type=attendant Process:: ID=1 PID=933 Type=slow timer Process:: ID=2 PID=934 Type=timer Process:: ID=3 PID=935 Type=MI FIFO Process:: ID=4 PID=936 Type=ctl handler Process:: ID=5 PID=937 Type=MI DATAGRAM Process:: ID=6 PID=938 Type=TIMER NH Process:: ID=7 PID=939 Type=tcp receiver (generic) child=0 Process:: ID=8 PID=940 Type=tcp receiver (generic) child=1 Process:: ID=9 PID=941 Type=tcp receiver (generic) child=2 Process:: ID=10 PID=942 Type=tcp receiver (generic) child=3 Process:: ID=11 PID=943 Type=tcp main process
And, now I can register to kamailio :) No error is written in syslog. An interesting workaround... Is this normal? i.e. is listening on a tcp port mandatory?
On Mon, Nov 5, 2012 at 12:03 PM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello, can you put also: listen=tcp:127.0.0.1:5060 <http://127.0.0.1:5060> ? Cheers, Daniel On Mon, Nov 5, 2012 at 9:31 AM, Ramazan Yilmaz <ramazan.cs@gmail.com <mailto:ramazan.cs@gmail.com>> wrote: Any idea? I have shared my tls configuration with you in my previous post, and as I said, that configuration works with kamailio 3.2.4. After silence of 4 days, do you confirm that it is a bug? If so, how can it be solved? Any suggestion? On Thu, Nov 1, 2012 at 4:23 PM, Ramazan Yilmaz <ramazan.cs@gmail.com <mailto:ramazan.cs@gmail.com>> wrote: In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration: listen=tls:XX.XX.XXX.XX:5061 #!ifdef WITH_TLS enable_tls=yes #!endif #!ifdef WITH_TLS loadmodule "tls.so" #!endif #!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif And my tls.cfg is, [server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem [client:default] verify_certificate = yes require_certificate = yes I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio. It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps. Best, -- Daniel-Constantin Mierla http://www.asipto.com
Then how does it work on kamailio-3.2.x without (explicit) tcp? Anyway, I will keep this in mind in my further kamailio setups.
On Tue, Nov 6, 2012 at 12:18 AM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
TLS is a security layer in top of TCP, so apparently tcp has to be specified as a listening transport layer to make tls work. Starting with v3.0.0, tls code is in a module, so the core might not initialize tcp if it does not have afferent sockets. Not sure what would take to make it work with tls only sockets - but definitely is no impact on resources, because the worker processes are the same for tcp and tls.
You can forbid tcp traffic from config file:
if(proto=TCP) { send_repply("403", "Not allowed"); exit; }
Cheers, Daniel
On 11/5/12 11:18 AM, Ramazan Yilmaz wrote:
Keeping listen=tls...., I also included "listen=tcp:127.0.0.1:5060". On restart it says,
Listening on tcp: 127.0.0.1:5060 tls: XX.XX.XX.XX [XX.XX.XX.XX]:5061 Aliases: *: XX.XX.XX.XX:*
kamailio started.
And now kamctl ps gives,
Process:: ID=0 PID=931 Type=attendant Process:: ID=1 PID=933 Type=slow timer Process:: ID=2 PID=934 Type=timer Process:: ID=3 PID=935 Type=MI FIFO Process:: ID=4 PID=936 Type=ctl handler Process:: ID=5 PID=937 Type=MI DATAGRAM Process:: ID=6 PID=938 Type=TIMER NH Process:: ID=7 PID=939 Type=tcp receiver (generic) child=0 Process:: ID=8 PID=940 Type=tcp receiver (generic) child=1 Process:: ID=9 PID=941 Type=tcp receiver (generic) child=2 Process:: ID=10 PID=942 Type=tcp receiver (generic) child=3 Process:: ID=11 PID=943 Type=tcp main process
And, now I can register to kamailio :) No error is written in syslog. An interesting workaround... Is this normal? i.e. is listening on a tcp port mandatory?
On Mon, Nov 5, 2012 at 12:03 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
can you put also:
listen=tcp:127.0.0.1:5060
?
Cheers, Daniel
On Mon, Nov 5, 2012 at 9:31 AM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
Any idea? I have shared my tls configuration with you in my previous post, and as I said, that configuration works with kamailio 3.2.4. After silence of 4 days, do you confirm that it is a bug? If so, how can it be solved? Any suggestion?
On Thu, Nov 1, 2012 at 4:23 PM, Ramazan Yilmaz ramazan.cs@gmail.comwrote:
In my kamailio configuration, I already have "#!define WITH_TLS". And some more about my configuration:
listen=tls:XX.XX.XXX.XX:5061
#!ifdef WITH_TLS enable_tls=yes #!endif
#!ifdef WITH_TLS loadmodule "tls.so" #!endif
#!ifdef WITH_TLS # ----- tls params ----- modparam("tls", "config", "/usr/local/kamailio-3.3/etc/kamailio/tls.cfg") #!endif
And my tls.cfg is,
[server:default] method = SSLv23 verify_certificate = no require_certificate = no private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem
[client:default] verify_certificate = yes require_certificate = yes
I have just installed kamailio 3.2.4 on some other server to see whether the problem is with my configuration/my system or with kamailio release. I again installed Ubuntu, and I installed the requested packages via apt-get, as I had done on problematic system. I used exactly the same configuration file, except changing the domain/ip values. And it worked. Then I used the same configuration file on some other versions of Ubuntu server, and it worked again. So, it really seems as a bug in kamailio.
It seems the worker children cannot be forked for some reason at startup, so I enabled WITH_DEBUG directive and restarted the kamailio. The output is attached to this mail. I hope it helps.
Best,
-- Daniel-Constantin Mierla http://www.asipto.com
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu