Fresh Install (Proxmox) - freeswitch service failed

ksargeant

New Member
Nov 1, 2024
3
1
3
26
I have just installed the latest version of FusionPBX on Proxmox CT as per the instructions.

I has ended the installation with:


Job for freeswitch.service failed because the control process exited with error code.
See "systemctl status freeswitch.service" and "journalctl -xeu freeswitch.service" for details.
Created symlink /etc/systemd/system/multi-user.target.wants/email_queue.service → /etc/systemd/system/email_queue.service.
Created symlink /etc/systemd/system/multi-user.target.wants/event_guard.service → /etc/systemd/system/event_guard.service.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cron is already the newest version (3.0pl1-162).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
no crontab for root

This is what I've done with the help of o3-mini:


Since FreeSWITCH requires the CAP_SYS_NICE capability (used for real‑time scheduling) which is typically not available in unprivileged LXC containers, you need to run the container in privileged mode. In your current configuration file, you have "unprivileged: 1", which means it’s an unprivileged container and that will drop capabilities like CAP_SYS_NICE.

To allow FreeSWITCH to properly set its scheduler, you have to:

Convert the Container to Privileged

If you're comfortable moving to a privileged container, update your /etc/pve/lxc/104.conf file as follows:

1. Change the unprivileged flag:
  unprivileged: 0

2. Add an AppArmor setting to disable confinement (this is often recommended when using nesting):
  lxc.apparmor.profile: unconfined

This has enabled freeswitch to start running, but now I've got 502 Bad Gateway when going to access the interface :rolleyes: So I then do the following:

[18-Feb-2025 09:50:36] ERROR: unable to bind listening socket for address '/run/php/php8.1-fpm.sock': No such file or directory (2)

[18-Feb-2025 09:50:36] ERROR: FPM initialization failed

[18-Feb-2025 09:55:43] NOTICE: configuration file /etc/php/8.1/fpm/php-fpm.conf test is successful

---

1. Create the directory:
/# mkdir -p /run/php

2. Set appropriate ownership. Often, the PHP-FPM process runs as user “www-data” (or the user specified in your PHP-FPM pool’s www.conf). For example:
/# chown www-data:www-data /run/php

• (If you’re not sure which user to use, check the www.conf file in /etc/php/8.1/fpm/pool.d/.)

3. Restart PHP-FPM:
/# systemctl restart php8.1-fpm

4. Check the status to ensure it’s running without errors:
/# systemctl status php8.1-fpm

---

All fine I can login, and then finally:

Fatal error: Uncaught Error: Call to a member function beginTransaction() on null in /var/www/fusionpbx/resources/classes/database.php:2168 Stack trace: #0 /var/www/fusionpbx/core/user_logs/resources/classes/user_logs.php(96): database->save() #1 /var/www/fusionpbx/core/authentication/resources/classes/authentication.php(385): user_logs::add() #2 /var/www/fusionpbx/resources/check_auth.php(127): authentication->validate() #3 /var/www/fusionpbx/login.php(30): require_once('...') #4 {main} thrown in /var/www/fusionpbx/resources/classes/database.php on line 2168

Has anyone else had to deal with this? Am I missing something?
 
Last edited: