In my kamailio configuration, I already have &quot;#!define WITH_TLS&quot;. And some more about my configuration:<br><br><div style="margin-left:40px">listen=tls:XX.XX.XXX.XX:5061<br><br>#!ifdef WITH_TLS<br>enable_tls=yes<br>
#!endif<br><br>#!ifdef WITH_TLS<br>loadmodule &quot;tls.so&quot;<br>#!endif<br><br>#!ifdef WITH_TLS<br># ----- tls params -----<br>modparam(&quot;tls&quot;, &quot;config&quot;, &quot;/usr/local/kamailio-3.3/etc/kamailio/tls.cfg&quot;)<br>
#!endif<br><br></div>And my tls.cfg is,<br><br><div style="margin-left:40px">[server:default]<br>method = SSLv23<br>verify_certificate = no<br>require_certificate = no<br>private_key = /usr/local/kamailio-3.3/etc/kamailio/kamailio.key<br>
certificate = /usr/local/kamailio-3.3/etc/kamailio/kamailio.pem<br><br>[client:default]<br>verify_certificate = yes<br>require_certificate = yes<br></div><br>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.<br>
<br>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.<br><br>Best,<br><br><div class="gmail_quote">
On Thu, Nov 1, 2012 at 2:44 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    What is the listen parameter for tls?<br>
    <br>
    IIRC, UDP is mandatory, you should have some workers for it, even
    you reject the traffic on it.<br>
    <br>
    The default config file has TLS support inside, just enable:<br>
    <br>
    #!define WITH_TLS<br>
    <br>
    and then test with it to see if you can connect. If yes, compare
    with your config to see what you did wrong.<br>
    <br>
    Cheers,<br>
    Daniel<div><div class="h5"><br>
    <br>
    <div>On 10/31/12 6:12 PM, Ramazan Yilmaz
      wrote:<br>
    </div>
    <blockquote type="cite">I swithced again to tcp, and &#39;kamctl ps&#39; now gives the
      following:<br>
      <br>
      <div style="margin-left:40px">Process::  ID=0 PID=5913
        Type=attendant<br>
        Process::  ID=1 PID=5914 Type=slow timer<br>
        Process::  ID=2 PID=5915 Type=timer<br>
        Process::  ID=3 PID=5916 Type=MI FIFO<br>
        Process::  ID=4 PID=5917 Type=ctl handler<br>
        Process::  ID=5 PID=5918 Type=MI DATAGRAM<br>
        Process::  ID=6 PID=5919 Type=TIMER NH<br>
        Process::  ID=7 PID=5920 Type=tcp receiver (generic) child=0<br>
        Process::  ID=8 PID=5921 Type=tcp receiver (generic) child=1<br>
        Process::  ID=9 PID=5922 Type=tcp receiver (generic) child=2<br>
        Process::  ID=10 PID=5923 Type=tcp receiver (generic) child=3<br>
        Process::  ID=11 PID=5924 Type=tcp main process<br>
      </div>
      <br>
      So it seems ok for TCP, right?<br>
      <br>
      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<br>
      <br>
      <div style="margin-left:40px">fork=yes<br>
        children=4<br>
        <br>
      </div>
      Any suggestion?<br>
      <br>
      <div class="gmail_quote">On Wed, Oct 31, 2012 at 6:18 PM,
        Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> 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.<br>
            <br>
            Cheers,<br>
            Daniel
            <div>
              <div><br>
                <br>
                <div>On 10/31/12 4:53 PM, Ramazan Yilmaz wrote:<br>
                </div>
                <blockquote type="cite">And the output of &#39;kamctl ps&#39; is
                  as following (after changing back to tls):<br>
                  <br>
                  Process::  ID=0 PID=5621 Type=attendant<br>
                  Process::  ID=1 PID=5622 Type=slow timer<br>
                  Process::  ID=2 PID=5623 Type=timer<br>
                  Process::  ID=3 PID=5624 Type=MI FIFO<br>
                  Process::  ID=4 PID=5625 Type=ctl handler<br>
                  Process::  ID=5 PID=5626 Type=MI DATAGRAM<br>
                  Process::  ID=6 PID=5627 Type=TIMER NH<br>
                  Process::  ID=7 PID=5628 Type=tcp main process<br>
                  <br>
                  And the new error lines in syslog for the processes
                  above are,<br>
                  Oct 31 16:52:14 ubuntu
                  /usr/local/kamailio-3.3/sbin/kamailio[5628]: :
                  &lt;core&gt; [tcp_main.c:3578]: BUG: handle_ser_child:
                  fd -1 for 0 (pid 5621)<br>
                  Oct 31 16:52:14 ubuntu
                  /usr/local/kamailio-3.3/sbin/kamailio[5628]: :
                  &lt;core&gt; [pass_fd.c:103]: ERROR: recv_all: 1st
                  recv on 56 failed: Bad file descriptor<br>
                  Oct 31 16:52:14 ubuntu
                  /usr/local/kamailio-3.3/sbin/kamailio[5628]: :
                  &lt;core&gt; [tcp_main.c:3363]: ERROR:
                  handle_tcp_child: read from tcp child 0  (pid 0, no 0)
                  Bad file descriptor [9]<br>
                  Oct 31 16:52:14 ubuntu
                  /usr/local/kamailio-3.3/sbin/kamailio[5628]: :
                  &lt;core&gt; [pass_fd.c:209]: ERROR: send_fd: sendmsg
                  failed sending 17 on 56: Bad file descriptor (9)<br>
                  Oct 31 16:52:14 ubuntu
                  /usr/local/kamailio-3.3/sbin/kamailio[5628]: ERROR:
                  &lt;core&gt; [tcp_main.c:4006]: ERROR: send2child:
                  send_fd failed for 0x7f215351b588 (flags 0x4018), fd
                  17<br>
                  <br>
                  <br>
                  <div class="gmail_quote">On Wed, Oct 31, 2012 at 5:04
                    PM, Ramazan Yilmaz <span dir="ltr">&lt;<a href="mailto:ramazan.cs@gmail.com" target="_blank">ramazan.cs@gmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These

                      messages are for tls. When switched to TCP, it
                      works fine. What can be the problem?
                      <div>
                        <div> <br>
                          <br>
                          <div class="gmail_quote">On Wed, Oct 31, 2012
                            at 3:39 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span>
                            wrote:<br>
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div bgcolor="#FFFFFF" text="#000000">
                                Hello,<br>
                                <br>
                                does registration over UDP work fine?
                                Are these messages for tcp or tls
                                connections?<br>
                                <br>
                                Can you paste the output of &#39;kamctl ps&#39;?<br>
                                <br>
                                Cheers,<br>
                                Daniel
                                <div>
                                  <div><br>
                                    <br>
                                    <div>On 10/30/12 5:32 PM, Ramazan
                                      Yilmaz wrote:<br>
                                    </div>
                                  </div>
                                </div>
                                <blockquote type="cite">
                                  <div>
                                    <div>Any ideas? It really seems as a
                                      bug, as the logs say. But do you
                                      have any workaround suggestion?<br>
                                      <br>
                                      <div class="gmail_quote">On Mon,
                                        Oct 29, 2012 at 11:09 PM,
                                        Ramazan Yilmaz <span dir="ltr">&lt;<a href="mailto:ramazan.cs@gmail.com" target="_blank">ramazan.cs@gmail.com</a>&gt;</span>
                                        wrote:<br>
                                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                          <div>
                                            <div>Hi,<span></span><br>
                                              <div>  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 <a href="http://www.kamailio.org/wiki/install/3.3.x/git" target="_blank">http://www.kamailio.org/wiki/install/3.3.x/git</a>.
                                                However there is a
                                                problem: clients cannot
                                                register to kamailio.
                                                Each registration
                                                attempt produces the
                                                following error in the
                                                syslog:</div>
                                              <div><br>
                                              </div>
                                              <div>Oct 29 20:07:38
                                                ubuntu
                                                /usr/local/kamailio-3.3/sbin/kamailio[32421]:
                                                : &lt;core&gt;
                                                [tcp_main.c:3578]: BUG:
                                                handle_ser_child: fd -1
                                                for 0 (pid 32414)<br>
                                                Oct 29 20:07:38 ubuntu
                                                /usr/local/kamailio-3.3/sbin/kamailio[32421]:
                                                : &lt;core&gt;
                                                [pass_fd.c:103]: ERROR:
                                                recv_all: 1st recv on 56
                                                failed: Bad file
                                                descriptor<br>
                                                Oct 29 20:07:38 ubuntu
                                                /usr/local/kamailio-3.3/sbin/kamailio[32421]:
                                                : &lt;core&gt;
                                                [tcp_main.c:3363]:
                                                ERROR: handle_tcp_child:
                                                read from tcp child 0
                                                (pid 0, no 0) Bad file
                                                descriptor [9]<br>
                                                Oct 29 20:07:38 ubuntu
                                                /usr/local/kamailio-3.3/sbin/kamailio[32421]:
                                                : &lt;core&gt;
                                                [pass_fd.c:209]: ERROR:
                                                send_fd: sendmsg failed
                                                sending 17 on 56: Bad
                                                file descriptor (9)<br>
                                                Oct 29 20:07:38 ubuntu
                                                /usr/local/kamailio-3.3/sbin/kamailio[32421]:
                                                ERROR: &lt;core&gt;
                                                [tcp_main.c:4006]:
                                                ERROR: send2child:
                                                send_fd failed for
                                                0x7f510bc41588 (flags
                                                0x4018), fd 17<br>
                                                <br>
                                              </div>
                                              <div>What could be the
                                                problem? Any suggestion?</div>
                                              <div><br>
                                              </div>
                                              <div>In case you need, the
                                                server is ubuntu server
                                                11.10, and I installed
                                                including mysql and tls
                                                modules.</div>
                                              <br>
                                            </div>
                                          </div>
                                        </blockquote>
                                      </div>
                                      <br>
                                      <br>
                                      <fieldset></fieldset>
                                      <br>
                                    </div>
                                  </div>
                                  <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
                                  <span><font color="#888888"> </font></span></blockquote>
                                <span><font color="#888888"> <br>
                                    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a></pre>
                                  </font></span></div>
                            </blockquote>
                          </div>
                          <br>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
                <br>
                <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a></pre>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a></pre>
  </div></div></div>

</blockquote></div><br>