[Freeswitch-users] Starting freeswitch at boot with systemd
William Colls
william at williamcollsassoc.ca
Wed May 11 01:33:23 MSD 2016
debian 8.4 64 bit
freeswitch 1.6.7 built locally from source
According to Debian 8 (jessie) Admin manual the preferred method of
starting something at boot time is to use systemd. In the
freeswitch/debian directory provided with the sources there is a
freeswitch.service example provided.
I have copied the provided example to /lib/systemd/system, and tweaked
it to reflect my setup, and enabled it.
;;;;; Author: Travis Cross <tc at traviscross.com>
[Unit]
Description=freeswitch
After=syslog.target network.target local-fs.target
[Service]
; service
Type=forking
PIDFile=/var/run/freeswitch/freeswitch.pid
EnvironmentFile=-/etc/default/freeswitch
ExecStart=/usr/local/bin/freeswitch -u freeswitch -g freeswitch -ncwait
-nonat
TimeoutSec=45s
Restart=always
; exec
User=freeswitch
Group=freeswitch
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=240K
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007
[Install]
WantedBy=multi-user.target
; end of freeswitch.service
However, when trying to start freeswitch, it fails with the following
errors.
● freeswitch.service - freeswitch
Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled)
Active: failed (Result: start-limit) since Tue 2016-05-10 16:59:16
EDT; 12s ago
Process: 1179 ExecStart=/usr/local/bin/freeswitch -u freeswitch -g
freeswitch -ncwait -nonat (code=exited, status=1/FAILURE)
May 10 16:59:16 freeswitch systemd[1]: freeswitch.service: control
process exited, code=exited status=1
May 10 16:59:16 freeswitch systemd[1]: Failed to start freeswitch.
May 10 16:59:16 freeswitch systemd[1]: Unit freeswitch.service entered
failed state.
May 10 16:59:16 freeswitch systemd[1]: freeswitch.service start request
repeated too quickly, refusing to start.
May 10 16:59:16 freeswitch systemd[1]: Failed to start freeswitch.
May 10 16:59:16 freeswitch systemd[1]: Unit freeswitch.service entered
failed state.
I have very limited experience with systemd. I have the documentation
from the Debian Admin Manual, but not much else.
I did successfully add another service to systemd. Initially I had the
same error message "xxx.service start request repeated too quickly,
refusing to start." and traced the problem to the service file pointing
to the wrong place for one of the listed files. I have verified that all
of the files do exist, and have suitable permissions.
Any as where I should go from here appreciated.
Thanks for your time.
William
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list