[Freeswitch-users] systemd

rick.jarvis at magicmail.mooo.com rick.jarvis at magicmail.mooo.com
Tue Oct 20 02:56:54 MSD 2015


Thanks Bote - systemd certainly sounds like a useful addition. Permissions look ok - this from a fresh reboot:

root at voice:~# ls -l /var/run/freeswitch/
total 4
-rw------- 1 freeswitch freeswitch 3 Oct 19 23:52 freeswitch.pid
> On 19 Oct 2015, at 23:48, Bote Man <bote_radio at botecomm.com> wrote:
> 
> It’s a permissions problem most likely.
>  
> 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. 
>  
> 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.
>  
> 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.
>  
> Hope this helps.
>  
> Bote
>  
>  
> From: rick.jarvis at magicmail.mooo.com
> Sent: Monday, 19 October, 2015 17:14
> Subject: Re: [Freeswitch-users] systemd
>  
> Nothing in /var/log/freeswitch/freeswitch.log
>  
> 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
>  
> root at voice:/etc/systemd/system# /usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp
> 1349 Backgrounding.
> FreeSWITCH[1348] Error starting system! pid:1349
> root at voice:/etc/systemd/system# /usr/bin/freeswitch -u freeswitch -g freeswitch -c -nonat -rp
> Cannot open pid file /var/run/freeswitch/freeswitch.pid.
>  
>> On 19 Oct 2015, at 22:01, covici at ccs.covici.com <mailto:covici at ccs.covici.com> wrote:
>>  
>> Something is preventing fs from starting and systemd keeps trying, but
>> eventually gives up.  Can you start it by hand with the same parameters?
>> Can you check the freeswitch.log and see if that says anything?
>> 
>> rick.jarvis at magicmail.mooo.com <mailto:rick.jarvis at magicmail.mooo.com> wrote:
>> 
>> 
>> This is my first Jessie install, so trying to get my head around systemd.
>> 
>> 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.
>> 
>> So I followed this to the letter:
>> 
>> https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video <https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video><https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video <https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video>>
>> 
>> But no joy:
>> 
>> root at voice:/etc/systemd/system# systemctl start freeswitch
>> Job for freeswitch.service failed. See 'systemctl status freeswitch.service' and 'journalctl -xn' for details.
>> root at voice:/etc/systemd/system# systemctl status freeswitch.service
>> ● freeswitch.service - freeswitch
>>   Loaded: loaded (/lib/systemd/system/freeswitch.service; disabled)
>>   Active: failed (Result: start-limit) since Mon 2015-10-19 21:47:53 BST; 26s ago
>>  Process: 1215 ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp (code=exited, status=1/FAILURE)
>> 
>> Oct 19 21:47:53 voice systemd[1]: freeswitch.service: control process exited, code=exited status=1
>> Oct 19 21:47:53 voice systemd[1]: Failed to start freeswitch.
>> Oct 19 21:47:53 voice systemd[1]: Unit freeswitch.service entered failed state.
>> Oct 19 21:47:53 voice systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
>> Oct 19 21:47:53 voice systemd[1]: Failed to start freeswitch.
>> Oct 19 21:47:53 voice systemd[1]: Unit freeswitch.service entered failed state.
>> 
>> 
>> What am I doing wrong?
>> ----------------------------------------------------
>> Alternatives:
>> 
>> ----------------------------------------------------
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services: 
>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
>> 
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
>> http://www.cluecon.com <http://www.cluecon.com/>
>> 
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>> -- 
>> Your life is like a penny.  You're going to lose it.  The question is:
>> How do
>> you spend it?
>> 
>>         John Covici
>>         covici at ccs.covici.com <mailto:covici at ccs.covici.com>
>> 
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services: 
>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
>> 
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
>> http://www.cluecon.com <http://www.cluecon.com/>
>> 
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>  
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: 
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org <http://www.freeswitch.org/>
> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
> http://www.cluecon.com <http://www.cluecon.com/>
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org <http://www.freeswitch.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151019/6ea8b916/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list