[Freeswitch-users] Installation failed Debian : SETSCHEDULER

Paul GOERGLER pgoergler at gmail.com
Wed Nov 18 10:23:08 MSK 2015


I add :
ExecStartPre=-/bin/chmod go+w /run
ExecStartPre=-/bin/mkdir -o /run/freeswitch
ExecStartPre=-/bin/chmod go+w /run/freeswitch

But it produce :
Nov 18 08:21:21 freeswitch systemd[24718]: Failed at step SETSCHEDULER spawning /bin/chmod: Operation not permitted
Nov 18 08:21:21 freeswitch systemd[24721]: Failed at step SETSCHEDULER spawning /bin/mkdir: Operation not permitted
Nov 18 08:21:21 freeswitch systemd[24724]: Failed at step SETSCHEDULER spawning /bin/chmod: Operation not permitted



-- 
Paul GOERGLER

On 18 novembre 2015 at 10:41:58, covici at ccs.covici.com (covici at ccs.covici.com) wrote:

put that command in your unit file as an ExecStartPre and see if it
works.

Paul GOERGLER <pgoergler at gmail.com> wrote:

>  
> Indeed /usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp failed to start.
> After investigation,the directory /run/freeswitch is missing.
>  
> For the test i chmod go+w /run and create /run/freeswitch (chmod go+w), and the command work fine.
>  
> But when i try with systemctl it’s the same issue.
> Nov 18 06:30:55 freeswitch systemd[31324]: Failed at step SETSCHEDULER spawning /usr/bin/freeswitch: Operation not permitted
>  
> -- 
> Paul GOERGLER
>  
> On 18 novembre 2015 at 09:10:45, Bote Man (bote_radio at botecomm.com) wrote:
>  
> It looks like you installed the package (not that there’s anything wrong with that) and I always compile the Master source code, so I can offer you troubleshooting advice since I have also had trouble with systemd.
>  
>  
>  
> First, try running that exact same command line as systemd uses to start FS as user ‘root’:
>  
>  
>  
> /usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp
>  
>  
> This will show you what systemd is seeing. You might find that FreeSWITCH can’t run for whatever reason that it reports in its own log. Fix that and everything might start to work.
>  
>  
>  
> It’s possible that it can’t write its PID file in /run/freeswitch as that directory might not exist because it is destroyed on each boot; I’m not sure about that, though.
>  
>  
>  
> There might also be permissions problems, although I doubt that as well, because the package should set up all that stuff for you, but it’s worth checking permissions and file ownership to be certain.
>  
>  
>  
> During troubleshooting you might want to comment that Restart= line so that when FS fails to start, systemd won’t try to restart it needlessly.
>  
>  
>  
> I know some of the guys have been working on this part of the package to get it perfect so I don’t know the current state of things there. The problems that I have seen with systemd and FS involved the PID file directory and the WorkingDirectory, as well as starting FS with a bare command line so it never drops privileges to the freeswitch user, resulting in permissions getting set for root; then when it is run with the –u switch it can’t access its logs and databases. I know the package uses different directory locations than the compiled source code installation, which is what gave me problems early on.
>  
>  
>  
> I have never seen an error message relating to SETSCHEDULER before.
>  
>  
>  
> Hope this helps.
>  
>  
>  
>  
>  
> ---
>  
> Bote
>  
>  
>  
> FreeSWITCH Docs Janitor
>  
> http://freeswitch.org/confluence
>  
>  
>  
>  
>  
>  
>  
>  
>  
> From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of pgoergler at gmail.com
> Sent: Tuesday, 17 November, 2015 13:33
> To: freeswitch-users at lists.freeswitch.org
> Subject: [Freeswitch-users] Installation failed Debian : SETSCHEDULER
>  
>  
>  
>  
>  
> Hello,
>  
>  
>  
> I try to install Freeswitch on a proxmox container with debian 8, following https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video
>  
> But it does not work
>  
>  
>  
>  
>  
> Here what i did:
>  
>  
>  
> # cat /etc/debian_version 
> 8.2
>  
>  
> # cat /etc/apt/sources.list.d/99FreeSWITCH.test.list 
> deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main
> # apt-get update
> [...]
> Hit http://files.freeswitch.org jessie InRelease               
> Hit http://files.freeswitch.org jessie/main amd64 Packages
> Ign http://files.freeswitch.org jessie/main Translation-en
> Fetched 367 B in 1s (279 B/s)                  
> Reading package lists... Done
>  
>  
>  
>  
> Now i follow the document and install freeswitch-all
>  
> # apt-get install freeswitch-all
> [...]
> Job for freeswitch.service failed. See 'systemctl status freeswitch.service' and 'journalctl -xn' for details.
> invoke-rc.d: initscript freeswitch, action "start" failed.
> dpkg: error processing package freeswitch-all (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Setting up libmtp-runtime (1.1.8-1+b1) ...
> Setting up va-driver-all:amd64 (1.4.1-1) ...
> Processing triggers for libc-bin (2.19-18+deb8u1) ...
> Processing triggers for systemd (215-17+deb8u2) ...
> Processing triggers for python-support (1.0.15) ...
> Errors were encountered while processing:
>  freeswitch-all
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>  
>  
> # tail /var/log/syslog
> Nov 17 16:50:15 freeswitch systemd[20020]: Failed at step SETSCHEDULER spawning /usr/bin/freeswitch: Operation not permitted
> Nov 17 16:50:15 freeswitch systemd[1]: freeswitch.service: control process exited, code=exited status=214
> Nov 17 16:50:15 freeswitch systemd[1]: Failed to start freeswitch.
> Nov 17 16:50:15 freeswitch systemd[1]: Unit freeswitch.service entered failed state.
> Nov 17 16:50:15 freeswitch systemd[1]: freeswitch.service holdoff time over, scheduling restart.
> Nov 17 16:50:15 freeswitch systemd[1]: Stopping freeswitch...
> Nov 17 16:50:15 freeswitch systemd[1]: Starting freeswitch...
> Nov 17 16:50:15 freeswitch systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
> Nov 17 16:50:15 freeswitch systemd[1]: Failed to start freeswitch.
> Nov 17 16:50:15 freeswitch systemd[1]: Unit freeswitch.service entered failed state.
>  
>  
>  
>  
> Ok the document said it could happen, i have to replace /lib/systemd/system/freeswitch.service
>  
> I did it
>  
> # cat /lib/systemd/system/freeswitch.service 
> [Unit]
> Description=freeswitch
> After=syslog.target network.target local-fs.target
>  
> [Service]
> ; service
> Type=forking
> PIDFile=/run/freeswitch/freeswitch.pid
> PermissionsStartOnly=true
> ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp
> TimeoutSec=45s
> Restart=on-failure
> ; exec
> WorkingDirectory=/usr/bin
> User=root
> Group=daemon
> LimitCORE=infinity
> LimitNOFILE=100000
> LimitNPROC=60000
> ;LimitSTACK=240
> LimitRTPRIO=infinity
> LimitRTTIME=7000000
> IOSchedulingClass=realtime
> IOSchedulingPriority=2
> CPUSchedulingPolicy=rr
> CPUSchedulingPriority=89
> UMask=0007
>  
> [Install]
> WantedBy=multi-user.target
>  
>  
> # systemctl daemon-reload && systemctl start freeswitch
> Job for freeswitch.service failed. See 'systemctl status freeswitch.service' and 'journalctl -xn' for details.
>  
>  
> Hum still not working
>  
>  
>  
> # systemctl status freeswitch.service
> * freeswitch.service - freeswitch
>    Loaded: loaded (/lib/systemd/system/freeswitch.service; disabled)
>    Active: failed (Result: start-limit) since Tue 2015-11-17 16:52:08 CET; 15s ago
>   Process: 20069 ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp (code=exited, status=214/SETSCHEDULER)
>  
> Nov 17 16:52:07 freeswitch systemd[1]: Failed to start freeswitch.
> Nov 17 16:52:07 freeswitch systemd[1]: Unit freeswitch.service entered failed state.
> Nov 17 16:52:08 freeswitch systemd[1]: freeswitch.service holdoff time over, scheduling restart.
> Nov 17 16:52:08 freeswitch systemd[1]: Stopping freeswitch...
> Nov 17 16:52:08 freeswitch systemd[1]: Starting freeswitch...
> Nov 17 16:52:08 freeswitch systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
> Nov 17 16:52:08 freeswitch systemd[1]: Failed to start freeswitch.
> Nov 17 16:52:08 freeswitch systemd[1]: Unit freeswitch.service entered failed state.
>  
>  
>  
>  
> And with the same error:
>  
> # tail /var/log/syslog
> Nov 17 16:52:07 freeswitch systemd[20069]: Failed at step SETSCHEDULER spawning /usr/bin/freeswitch: Operation not permitted
> Nov 17 16:52:07 freeswitch systemd[1]: freeswitch.service: control process exited, code=exited status=214
> Nov 17 16:52:07 freeswitch systemd[1]: Failed to start freeswitch.
> Nov 17 16:52:07 freeswitch systemd[1]: Unit freeswitch.service entered failed state.
> Nov 17 16:52:08 freeswitch systemd[1]: freeswitch.service holdoff time over, scheduling restart.
> Nov 17 16:52:08 freeswitch systemd[1]: Stopping freeswitch...
> Nov 17 16:52:08 freeswitch systemd[1]: Starting freeswitch...
> Nov 17 16:52:08 freeswitch systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
> Nov 17 16:52:08 freeswitch systemd[1]: Failed to start freeswitch.
> Nov 17 16:52:08 freeswitch systemd[1]: Unit freeswitch.service entered failed state.
>  
>  
>  
>  
> What can i do to make it start correctly ?
>  
>  
>  
>  
>  
> Thanks,
>  
> -- 
>  
> _________________________________________________________________________
> 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
> ----------------------------------------------------
> 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
covici at ccs.covici.com

_________________________________________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151118/f5318c8f/attachment-0001.html 


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