Freeswitch fails on new fusionpbx install on to ct lxc debian11 on proxmox 7.2.3

Status
Not open for further replies.

lawson

New Member
Feb 12, 2020
2
0
1
Installation appears to complete successfully after using a valid token from signalwire and correct repos. Correct locale is set.

The environment is using a clean install of proxmox 7.2.3 and CT template debian-11-standard_11.3-1_amd64.tar.zst onto a dell intel x64 server. The lxc ct container is an unprivileged container with 4cores, 8gb ram, 80gb disk, and has keyctl and nesting options enabled in proxmox.

Inside the lxc debian container I successfully follow the Installing Freeswitch From Debian Packages instructions here https://freeswitch.org/confluence/display/FREESWITCH/Debian

And next I successfully follow the Debian Install instruction found here


However after installation freeswitch.service fails to start and after hours of troubleshooting I cannot find what to do or try next to resolve this issue.

Anyone have suggestions? Thanks

Log info pasted below:




# journalctl -u freeswitch.service
-- Journal begins at Sat 2022-05-21 22:32:58 UTC, ends at Sun 2022-05-22 08:15:01 UTC. --
May 22 03:14:35 deb11ffreeswitch systemd[1]: Starting freeswitch...
May 22 03:14:35 deb11ffreeswitch systemd[122776]: freeswitch.service: Failed to set up CPU scheduling: Operation not permitted
May 22 03:14:35 deb11ffreeswitch systemd[122776]: freeswitch.service: Failed at step SETSCHEDULER spawning /bin/mkdir: Operation not permitted
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Control process exited, code=exited, status=214/SETSCHEDULER
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Failed with result 'exit-code'.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Failed to start freeswitch.
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Scheduled restart job, restart counter is at 1.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Stopped freeswitch.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Starting freeswitch...
May 22 03:14:35 deb11ffreeswitch systemd[122787]: freeswitch.service: Failed to set up CPU scheduling: Operation not permitted
May 22 03:14:35 deb11ffreeswitch systemd[122787]: freeswitch.service: Failed at step SETSCHEDULER spawning /bin/mkdir: Operation not permitted
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Control process exited, code=exited, status=214/SETSCHEDULER
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Failed with result 'exit-code'.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Failed to start freeswitch.
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Scheduled restart job, restart counter is at 2.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Stopped freeswitch.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Starting freeswitch...
May 22 03:14:35 deb11ffreeswitch systemd[122794]: freeswitch.service: Failed to set up CPU scheduling: Operation not permitted
May 22 03:14:35 deb11ffreeswitch systemd[122794]: freeswitch.service: Failed at step SETSCHEDULER spawning /bin/mkdir: Operation not permitted
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Control process exited, code=exited, status=214/SETSCHEDULER
May 22 03:14:35 deb11ffreeswitch systemd[1]: freeswitch.service: Failed with result 'exit-code'.
May 22 03:14:35 deb11ffreeswitch systemd[1]: Failed to start freeswitch.
May 22 03:14:36 deb11ffreeswitch systemd[1]: freeswitch.service: Scheduled restart job, restart counter is at 3.

----------


# systemctl list-units
* sys-kernel-config.mount loaded failed failed Kernel Configuration File System
* fail2ban.service loaded failed failed Fail2Ban Service
* freeswitch.service loaded failed failed freeswitch
* networking.service loaded failed failed Raise network interfaces
* systemd-journald-audit.socket loaded failed failed Journal Audit Socket

--------

#systemctl status freeswitch.service
* freeswitch.service - freeswitch
Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-05-22 07:56:54 UTC; 15min ago
Process: 130162 ExecStartPre=/bin/mkdir -p /var/run/freeswitch (code=exited, status=214/SETSCHEDULER)
CPU: 799us

May 22 07:56:54 deb11ffreeswitch systemd[1]: freeswitch.service: Scheduled restart job, restart counter is at 5.
May 22 07:56:54 deb11ffreeswitch systemd[1]: Stopped freeswitch.
May 22 07:56:54 deb11ffreeswitch systemd[1]: freeswitch.service: Start request repeated too quickly.
May 22 07:56:54 deb11ffreeswitch systemd[1]: freeswitch.service: Failed with result 'exit-code'.
May 22 07:56:54 deb11ffreeswitch systemd[1]: Failed to start freeswitch.


-------------

#journalctl -xe
--
-- The job identifier is 3697 and the job result is done.
May 22 07:56:54 deb11ffreeswitch systemd[1]: freeswitch.service: Start request repeated too quickly.
May 22 07:56:54 deb11ffreeswitch systemd[1]: freeswitch.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit freeswitch.service has entered the 'failed' state with result 'exit-code'.
May 22 07:56:54 deb11ffreeswitch systemd[1]: Failed to start freeswitch.
-- Subject: A start job for unit freeswitch.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit freeswitch.service has finished with a failure.
--
-- The job identifier is 3697 and the job result is failed.
May 22 08:05:01 deb11ffreeswitch CRON[130192]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
May 22 08:05:01 deb11ffreeswitch CRON[130193]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
May 22 08:05:01 deb11ffreeswitch CRON[130192]: pam_unix(cron:session): session closed for user root
May 22 08:09:01 deb11ffreeswitch CRON[130207]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
May 22 08:09:01 deb11ffreeswitch CRON[130208]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
May 22 08:09:01 deb11ffreeswitch CRON[130207]: pam_unix(cron:session): session closed for user root
May 22 08:09:01 deb11ffreeswitch systemd[1]: Starting Clean php session files...
-- Subject: A start job for unit phpsessionclean.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit phpsessionclean.service has begun execution.
--
-- The job identifier is 3756.
May 22 08:09:01 deb11ffreeswitch systemd[1]: phpsessionclean.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit phpsessionclean.service has successfully entered the 'dead' state.
May 22 08:09:01 deb11ffreeswitch systemd[1]: Finished Clean php session files.
-- Subject: A start job for unit phpsessionclean.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit phpsessionclean.service has finished successfully.
--
-- The job identifier is 3756.
 

Scuzz

New Member
Feb 7, 2019
19
2
3
50
The Fusionpbx install script takes care of installing freeswitch for you. You are not suppose to install beforehand.
These are the steps i take to install fusionpbx.

Step 1
wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | sh;
cd /usr/src/fusionpbx-install.sh/debian

Step 2
cd resources

Step 3 nano config.sh and add your signalwire token in the appropriate location and save

Step 4 cd .. or cd /usr/src/fusionpbx-install.sh/debian

Step 5 ./install.sh

And this will install freeswitch and fusionpbx all in one shot.

From FusionPBX Docs

If using Debian on Proxmox LXC containers please run the following BEFORE starting the FusionPBX install.
apt-get update && apt-get upgrade
apt-get install systemd
apt-get install systemd-sysv
apt-get install ca-certificates
reboot
 
Last edited:

lawson

New Member
Feb 12, 2020
2
0
1
The Fusionpbx install script takes care of installing freeswitch for you. You are not suppose to install beforehand.
These are the steps i take to install fusionpbx.

Step 1
wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | sh;
cd /usr/src/fusionpbx-install.sh/debian

Step 2
cd resources

Step 3 nano config.sh and add your signalwire token in the appropriate location and save

Step 4 cd .. or cd /usr/src/fusionpbx-install.sh/debian

Step 5 ./install.sh

And this will install freeswitch and fusionpbx all in one shot.

From FusionPBX Docs

If using Debian on Proxmox LXC containers please run the following BEFORE starting the FusionPBX install.
apt-get update && apt-get upgrade
apt-get install systemd
apt-get install systemd-sysv
apt-get install ca-certificates
reboot

Thanks for your reply.

Regarding my first post I did not install freeswitch beforehand. I installed the token and repos as per their instruction but I did not run the final signalwire 'apt-get install -y freeswitch' command. I allowed the fusionpbx installer to perform the install.

Nevertheless, I setup another new debian 11 container in proxmox and followed your posted instructions and I added the signalwire token into the config.sh and I completed the fusionpbx install again and am getting the very same errors as before. By the way, the commands you posted:
apt-get install systemd
apt-get install systemd-sysv
apt-get install ca-certificates
...these do not install anything new in the container.

Next, I also created a new proxmox container based on debian-10_10.7-1_amd64.tar.gz and another container based on ubuntu-20.04-standard_20.04-1.tar.gz CT templates and performed the fusionpbx installation which appears to install successfully (i don't notice any errors during the installation) on these other containers and all systems are showing the same freeswitch errors:



Code:
# journalctl -xe
May 22 21:00:32 deb11fstest systemd[1]: Starting freeswitch...
-- Subject: A start job for unit freeswitch.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit freeswitch.service has begun execution.
--
-- The job identifier is 1686.
May 22 21:00:32 deb11fstest systemd[125577]: freeswitch.service: Failed to set up CPU scheduling: Operation not permitted
May 22 21:00:32 deb11fstest systemd[125577]: freeswitch.service: Failed at step SETSCHEDULER spawning /bin/mkdir: Operation not permitted
-- Subject: Process /bin/mkdir could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The process /bin/mkdir could not be executed and failed.
--
-- The error number returned by this process is ERRNO.
May 22 21:00:32 deb11fstest systemd[1]: freeswitch.service: Control process exited, code=exited, status=214/SETSCHEDULER
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStartPre= process belonging to unit freeswitch.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 214.
May 22 21:00:32 deb11fstest systemd[1]: freeswitch.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit freeswitch.service has entered the 'failed' state with result 'exit-code'.
May 22 21:00:32 deb11fstest systemd[1]: Failed to start freeswitch.
-- Subject: A start job for unit freeswitch.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit freeswitch.service has finished with a failure.
--
-- The job identifier is 1686 and the job result is failed.
May 22 21:00:32 deb11fstest systemd[1]: freeswitch.service: Scheduled restart job, restart counter is at 3.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Automatic restarting of the unit freeswitch.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
May 22 21:00:32 deb11fstest systemd[1]: Stopped freeswitch.
-- Subject: A stop job for unit freeswitch.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit freeswitch.service has finished.



Code:
root@deb11fstest:~# freeswitch -c
ERROR: Failed to set SCHED_FIFO scheduler (Operation not permitted)

All these errors lead me to believe its a problem with unprivileged lxc container.

After further searching and reading I finally did find other older posts on the forum with people identifying that they too had problems to get freeswitch running in an unprivileged container.


What problems could be caused by commenting out these lines from /lib/systemd/system/freeswitch.service which will then allow freeswitch to start unprivileged? How severe of a performance penalty does this cost in order for freeswitch to run in an unprivileged container?
#IOSchedulingClass=realtime
#IOSchedulingPriority=2
#CPUSchedulingPolicy=rr

Otherwise, is there any performance penalty or only security concerns with running the container as privileged and keeping the above lines intact?


Has anyone been able to successfully run freeswitch in an lxc ct unprivileged container without disabling IOSchedulingClass=realtime?
 
Last edited:
Status
Not open for further replies.