[Freeswitch-users] Installation failed Debian : SETSCHEDULER
Stanislav Sinyagin
ssinyagin at gmail.com
Wed Nov 18 10:26:28 MSK 2015
another possible reason is that it tried to set itself to real-time
scheduler, and failed because of insufficient permissions.
On Wed, Nov 18, 2015 at 8:21 AM, Stanislav Sinyagin <ssinyagin at gmail.com> wrote:
> well, I actually did see this failure few days ago -- I tried running
> FreeSWITCH under SmartOS "LX Branded Zones", which is basically binary
> Debian executables within Solaris zone, mapping Linux kernel calls
> into Solaris kernel calls.
>
> The error means that the process could not acquire a high-resolution
> clock. I know the reasons under SmartOS, but you need to figure out
> under Proxmox yourself. You need to find a way to grant the container
> the permission to use high-resolution clock.
>
> Also it's worth using the unstable master debs, as they contain some
> important bugfixes for Debian 8 startup. These changes are not yet
> merged into the 1.6 release branch.
>
>
>
>
>
> On Wed, Nov 18, 2015 at 6:32 AM, 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
>>
>>
>> _________________________________________________________________________
>> 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
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list