[Freeswitch-users] systemd

Bote Man bote_radio at botecomm.com
Tue Oct 20 02:48:03 MSD 2015


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 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?

 <mailto:rick.jarvis at magicmail.mooo.com> 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>

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
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
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
         <mailto:covici at ccs.covici.com> covici at ccs.covici.com

_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
 <mailto:consulting at freeswitch.org> 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
 <mailto:FreeSWITCH-users at lists.freeswitch.org> FreeSWITCH-users at lists.freeswitch.org
 <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http:// <http://lists.freeswitch.org/mailman/options/freeswitch-users> 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/160c9f68/attachment-0002.html 


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