<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Monaco;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It’s a permissions problem most likely.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>systemd should start FS as root, FS creates any directories and files that it needs, increases runtime priority, and claims ports, then FS drops its own privileges to those specified by the –u and –g switches. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It’s worth checking the ownership and permissions of the files and directories that FS has already created (such as freeswitch.pid) to avoid further gnashing of teeth.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If you are using systemd, you control processes with the ‘systemctl’ command, not ‘service’. Systemd has the ability to restart FS if it crashes and other useful things so I recommend getting up to speed on it as it seems to be quite robust.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hope this helps.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Bote<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rick.jarvis@magicmail.mooo.com<br><b>Sent:</b> Monday, 19 October, 2015 17:14<br><b>Subject:</b> Re: [Freeswitch-users] systemd<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Nothing in /var/log/freeswitch/freeswitch.log<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Results of running it at command line below. I’ve tried running it with ‘c’ instead of ‘ncwait’ as well, but it complains about the pid<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><p class=MsoNormal style='background:black'><span style='font-size:10.5pt;font-family:"Monaco","serif";color:whitesmoke'>root@voice:/etc/systemd/system# /usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-size:10.5pt;font-family:"Monaco","serif";color:whitesmoke'>1349 Backgrounding.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-size:10.5pt;font-family:"Monaco","serif";color:whitesmoke'>FreeSWITCH[1348] Error starting system! pid:1349<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-size:10.5pt;font-family:"Monaco","serif";color:whitesmoke'>root@voice:/etc/systemd/system# /usr/bin/freeswitch -u freeswitch -g freeswitch -c -nonat -rp<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-size:10.5pt;font-family:"Monaco","serif";color:whitesmoke'>Cannot open pid file /var/run/freeswitch/freeswitch.pid.<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On 19 Oct 2015, at 22:01, <a href="mailto:covici@ccs.covici.com">covici@ccs.covici.com</a> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Something is preventing fs from starting and systemd keeps trying, but<br>eventually gives up. &nbsp;Can you start it by hand with the same parameters?<br>Can you check the freeswitch.log and see if that says anything?<br><br></span><a href="mailto:rick.jarvis@magicmail.mooo.com"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>rick.jarvis@magicmail.mooo.com</span></a><span class=apple-converted-space><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>&nbsp;</span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>wrote:<br><br></span><o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>This is my first Jessie install, so trying to get my head around systemd.<br><br>I’ve installed from repos, and it all works fine with ‘service start freeswitch’ as I used to use. However, as update-rc.d doesn’t work for starting on boot, I figured this is due to the startup changes in jessie.<br><br>So I followed this to the letter:<br><br><a href="https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video">https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video</a>&lt;<a href="https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video">https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video</a>&gt;<br><br>But no joy:<br><br>root@voice:/etc/systemd/system# systemctl start freeswitch<br>Job for freeswitch.service failed. See 'systemctl status freeswitch.service' and 'journalctl -xn' for details.<br>root@voice:/etc/systemd/system# systemctl status freeswitch.service<br>● freeswitch.service - freeswitch<br>&nbsp;&nbsp;Loaded: loaded (/lib/systemd/system/freeswitch.service; disabled)<br>&nbsp;&nbsp;Active: failed (Result: start-limit) since Mon 2015-10-19 21:47:53 BST; 26s ago<br>&nbsp;Process: 1215 ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp (code=exited, status=1/FAILURE)<br><br>Oct 19 21:47:53 voice systemd[1]: freeswitch.service: control process exited, code=exited status=1<br>Oct 19 21:47:53 voice systemd[1]: Failed to start freeswitch.<br>Oct 19 21:47:53 voice systemd[1]: Unit freeswitch.service entered failed state.<br>Oct 19 21:47:53 voice systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.<br>Oct 19 21:47:53 voice systemd[1]: Failed to start freeswitch.<br>Oct 19 21:47:53 voice systemd[1]: Unit freeswitch.service entered failed state.<br><br><br>What am I doing wrong?<br>----------------------------------------------------<br>Alternatives:<br><br>----------------------------------------------------<br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<span class=apple-converted-space>&nbsp;</span><br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br><a href="http://www.cluecon.com">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>--<span class=apple-converted-space>&nbsp;</span><br>Your life is like a penny. &nbsp;You're going to lose it. &nbsp;The question is:<br>How do<br>you spend it?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;John Covici<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="mailto:covici@ccs.covici.com"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>covici@ccs.covici.com</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<span class=apple-converted-space>&nbsp;</span><br></span><a href="mailto:consulting@freeswitch.org"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>consulting@freeswitch.org</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br></span><a href="http://www.freeswitchsolutions.com/"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://www.freeswitchsolutions.com</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br><br>Official FreeSWITCH Sites<br></span><a href="http://www.freeswitch.org/"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://www.freeswitch.org</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br></span><a href="http://confluence.freeswitch.org/"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://confluence.freeswitch.org</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br></span><a href="http://www.cluecon.com/"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://www.cluecon.com</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br><br>FreeSWITCH-users mailing list<br></span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>FreeSWITCH-users@lists.freeswitch.org</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br></span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br>UNSUBSCRIBE:http://</span><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>lists.freeswitch.org/mailman/options/freeswitch-users</span></a><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br></span><a href="http://www.freeswitch.org/"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://www.freeswitch.org</span></a><o:p></o:p></p></div></blockquote></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>