<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>when starting from the "sbin" directory it uses this as default: "<span style="font-size: 12pt;">/var/run/kamailio.pid"...</span><span style="font-size: 12pt;">I changed it to "</span><span style="font-size: 12pt;">PID_FILE=/var/run/kamailio/kamailio.pid</span><span style="font-size: 12pt;">"
 and it works fine as well</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">the PID_FILE in the "<span> /etc/init.d/kamailio" file is also that one: "</p>
<div>PID_FILE=/var/run/kamailio/kamailio.pid" and that folder has all permissions.<br>
<br>
</div>
</span></span>
<p></p>
I can still use it w/o the service script but it would be nice to have it be working properly<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Fabian Borot <fborot@hotmail.com><br>
<b>Sent:</b> Thursday, August 4, 2016 9:54 AM<br>
<b>To:</b> sr-users@lists.sip-router.org<br>
<b>Subject:</b> Re: Kamailio 4.4 wont start on CentOS 7 using script</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>thank you, yes, I did have to change these lines according to my install path , these are my settings:</p>
<p><br>
</p>
<div id="Signature">
<div>
<div>
<div><span style="font-size:12pt">KAM=/usr/local/kamailio-4.4/sbin/kamailio</span><br>
</div>
<div><span style="font-size:12pt">KAMCFG=/usr/local/kamailio-4.4/etc/kamailio/kamailio.cfg</span><br>
</div>
<div>PROG=kamailio</div>
<div>PID_FILE=/var/run/kamailio.pid</div>
<div>LOCK_FILE=/var/lock/subsys/kamailio</div>
<div>RETVAL=0</div>
<div><span style="font-size:12pt">DEFAULTS=/etc/default/kamailio</span><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
the directory is created:
<div>
<div>[root@ar-mia-proxy-01 ~]# ls -la /var/run/kamailio/</div>
<div>total 0</div>
<div>drwxr-xr-x.  2 root root  40 Aug  4 15:18 .</div>
<div>drwxr-xr-x. 23 root root 640 Aug  4 15:18 ..</div>
<div>[root@ar-mia-proxy-01 ~]#</div>
<div><br>
</div>
<div>I am using the "root" user so it has access to it</div>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Fabian Borot <fborot@hotmail.com><br>
<b>Sent:</b> Thursday, August 4, 2016 9:30 AM<br>
<b>To:</b> sr-users@lists.sip-router.org<br>
<b>Subject:</b> Kamailio 4.4 wont start on CentOS 7 using script</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello</p>
<p>I installed/compiled version 4.4 on CentOS 7. When I start the server like this: "./kamctl start" it works but when I try to use the script: "/etc/init.d/kamailio" it fails</p>
<p><br>
</p>
<p><span style="font-size:12pt"> </span><br>
</p>
<div id="Signature">
<div>
<div>
<div>[root@ar-mia-proxy-01 sbin]# /etc/init.d/kamailio start</div>
<div>Starting kamailio (via systemctl):  Job for kamailio.service failed because the control process exited with error code. See "systemctl status kamailio.service" and "journalctl -xe" for details.</div>
<div>                                                           [FAILED]</div>
<div>[root@ar-mia-proxy-01 sbin]#</div>
<div><br>
</div>
<div>when running the "status" I see this:</div>
<div>
<div><br>
</div>
<div>
<div>[root@ar-mia-proxy-01 sbin]# /etc/init.d/kamailio status</div>
<div>â kamailio.service - LSB: Kamailio (OpenSER) - the Open Source SIP Server</div>
<div>   Loaded: loaded (/etc/rc.d/init.d/kamailio)</div>
<div>   Active: failed (Result: exit-code) since Thu 2016-08-04 15:25:59 GMT; 14s ago</div>
<div>     Docs: man:systemd-sysv-generator(8)</div>
<div>  Process: 5556 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)</div>
<div><br>
</div>
<div>Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: Starting LSB: Kamailio (OpenSER) - the Open Source SIP Server...</div>
<div>Aug 04 15:25:59 ar-mia-proxy-01.dom.com kamailio[5556]: Starting kamailio:</div>
<div>Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: kamailio.service: control process exited, code=exited status=1</div>
<div>Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: Failed to start LSB: Kamailio (OpenSER) - the Open Source SIP Server.</div>
<div>Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: Unit kamailio.service entered failed state.</div>
<div>Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: kamailio.service failed.</div>
<div>[root@ar-mia-proxy-01 sbin]#</div>
<br>
</div>
<div></div>
<div>I welcome all ideas, thank you in advance</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>