<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br>I fixed the problem but I would like somebody to shed some light into this issue.<br><br>I noticed that when I run kamailio w/o telling where to load the kamailio.cfg file is when it failed. So I went to the kamctl script and notice that in the section where "kamctl start" happens the variable $STARTOPTIONS was empty. I went to the etc/kamailio/kamctlrc, un-commented the line with $STARTOPTIONS and made it like this:<br><br><div>
<div>&nbsp;<br>STARTOPTIONS=" -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg" -&gt; this points to the config file which is in a custom path<br><br>So, it seems that when one installs kamailio in a directory other than the default path with the prefix option ['make prefix="new path here" all' and 'make prefix="new path here" install'] you have to explicitly tell it somehow to load the config file from somewhere else. Or I did not do it correctly. Can somebody please confirm?.<br>I thought that the initialization scripts would also take care of that. I have installed kamailio 1.4.3&nbsp; 1.5.0, 1.5.2 using the prefix option at 'make' time several times and never had this issue.<br><br>Again, these were my main steps:<br><br>&nbsp;mkdir -p /usr/local/src/kamailio-3.1.0<br>cd /usr/local/src/kamailio-3.1.0<br><br>git clone --depth 1 git://git.sip-router.org/sip-router kamailio<br>cd kamailio<br>git checkout -b 3.1 origin/3.1<br><br>mkdir /usr/local/kamailio-3.1<br><br>make FLAVOUR=kamailio cfg<br><br>vi modules.lst to exclude db_mysql db_odbc from modules.lst <br><br>make PREFIX="/usr/local/kamailio-3.1/" all<br>make PREFIX="/usr/local/kamailio-3.1/" install<br>
<br>then I executed /usr/local/kamailio-3.1/sbin/kamdbctl create to create the DB and tables.<br><br></div></div><br><br><div><hr id="stopSpelling">From: fborot@hotmail.com<br>To: sr-users@lists.sip-router.org<br>Date: Fri, 24 Jun 2011 18:10:38 -0400<br>Subject: Re: [SR-Users] kamailio fails to start with kamctl start<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>

<div dir="ltr">
<br>I enabled debugging on the kamctl script and see these lines right before it fails:<br><br>+ minfo 'Starting Kamailio : '<br>+ '[' -t 1 -a -z '' ']'<br>+ echo -e '\E[37;33m\033[1mINFO: Starting Kamailio : \033[0m'<br>INFO: Starting Kamailio :<br>+ '[' -r /var/run/kamailio.pid ']'<br>+ '[' '!' -x ./kamailio ']'<br>+ '[' 1 = 1 ']'<br>+ ./kamailio -P /var/run/kamailio.pid<br>+ sleep 3<br>+ '[' '!' -s /var/run/kamailio.pid ']'<br>+ echo<br><br>+ merr 'PID file /var/run/kamailio.pid does not exist -- Kamailio start failed'<br>+ '[' -t 1 -a -z '' ']'<br>+ echo -e '\E[37;31m\033[1mERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed\033[0m'<br>ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed<br>+ exit 1<br>[root@registrar sbin]#<br><br><br>these are the main steps I followed to install it:<br><br>mkdir -p /usr/local/src/kamailio-3.1.0<br>cd /usr/local/src/kamailio-3.1.0<br><br>git clone --depth 1 git://git.sip-router.org/sip-router kamailio<br>cd kamailio<br>git checkout -b 3.1 origin/3.1<br><br>mkdir /usr/local/kamailio-3.1<br><br>make FLAVOUR=kamailio cfg<br><br>vi modules.lst to exclude db_mysql db_odbc from modules.lst <br><br>make PREFIX="/usr/local/kamailio-3.1/" all<br>make PREFIX="/usr/local/kamailio-3.1/" install<br><div>
<div><br>then I executed /usr/local/kamailio-3.1/sbin/kamdbctl create to create the DB and tables.<br><br></div></div><br><br><div><hr id="ecxstopSpelling">From: fborot@hotmail.com<br>To: sr-users@lists.sip-router.org<br>Date: Fri, 24 Jun 2011 16:28:28 -0400<br>Subject: [SR-Users] kamailio fails to start with kamctl start<br><br>



<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>

<div dir="ltr">
Hello<br>I just installed kamailio-3.1 and using the default config file "kamctl start" fails<br><br><div>
<div>&nbsp;[root@registrar sbin]# ./kamctl start<br><br>INFO: Starting Kamailio :<br><br>ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed<br>[root@registrar sbin]# <br><br>but when I use this command it starts: &lt;kamailio -f path_to_config_file<br><br>[root@registrar sbin]# ./kamailio -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg<br>loading modules under /usr/local/kamailio-3.1//lib64/kamailio/modules_k/:/usr/local/kamailio-3.1//lib64/kamailio/modules/<br>Listening on<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: 127.0.0.1:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: 192.168.168.10:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: 127.0.0.1:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: 192.168.168.10:5060<br>Aliases:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: localhost:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: localhost.localdomain:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: registrar:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: registrar.mytestdomain.com:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: localhost:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: localhost.localdomain:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: registrar:5060<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: registrar.mytestdomain.com:5060<br><br>[root@registrar sbin]#<br><br>Also, when I use "./kamctl start" the syslog file does not show anything at all that would help me why it is failing. <br>But when I use "/usr/local/kamailio-3.1/sbin/kamailio -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg" it does update the syslog file.<br><br>Also, after kamailio start with "./kamailio -f .." I can use ./kamctl fifo &lt;any option&gt;. Example:<br><br>[root@registrar sbin]# ./kamctl fifo version<br>Server:: kamailio (3.1.4 (x86_64/linux))<br>Build:: mi_core.c compiled on 15:09:40 Jun 24 2011 with gcc 4.1.2<br>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<br>GIT:: e2d6f0<br>[root@registrar sbin]#<br><br>[root@registrar sbin]# ./kamctl fifo ps<br>Process::&nbsp; ID=0 PID=27078 Type=attendant<br>Process::&nbsp; ID=1 PID=27079 Type=udp receiver child=0 sock=127.0.0.1:5060<br>Process::&nbsp; ID=2 PID=27080 Type=udp receiver child=1 sock=127.0.0.1:5060<br>Process::&nbsp; ID=3 PID=27081 Type=udp receiver child=2 sock=127.0.0.1:5060<br>Process::&nbsp; ID=4 PID=27082 Type=udp receiver child=3 sock=127.0.0.1:5060<br>Process::&nbsp; ID=5 PID=27083 Type=udp receiver child=0 sock=192.168.168.10:5060<br>Process::&nbsp; ID=6 PID=27084 Type=udp receiver child=1 sock=192.168.168.10:5060<br>Process::&nbsp; ID=7 PID=27085 Type=udp receiver child=2 sock=192.168.168.10:5060<br>Process::&nbsp; ID=8 PID=27086 Type=udp receiver child=3 sock=192.168.168.10:5060<br>Process::&nbsp; ID=9 PID=27087 Type=slow timer<br>Process::&nbsp; ID=10 PID=27088 Type=timer<br>Process::&nbsp; ID=11 PID=27089 Type=MI FIFO<br>Process::&nbsp; ID=12 PID=27090 Type=ctl handler<br>Process::&nbsp; ID=13 PID=27091 Type=tcp receiver child=0<br>Process::&nbsp; ID=14 PID=27092 Type=tcp receiver child=1<br>Process::&nbsp; ID=15 PID=27093 Type=tcp receiver child=2<br>Process::&nbsp; ID=16 PID=27094 Type=tcp receiver child=3<br>Process::&nbsp; ID=17 PID=27095 Type=tcp main process<br>[root@registrar sbin]#<br><br><br><br></div></div>                                               </div>
<br>_______________________________________________
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</div>                                               </div>
<br>_______________________________________________
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</div>                                               </div></body>
</html>