freeswitch isn't installing correctly, init issue.

Status
Not open for further replies.

syadnom

New Member
Jun 2, 2017
6
0
1
44
I ran the install script from the downloads page. Get this error:

dpkg: warning: while removing freeswitch-music-default, directory '/usr/share/freeswitch/sounds/music' not empty so not removed
mv: cannot move '/etc/freeswitch' to '/etc/freeswitch.orig/freeswitch': Directory not empty
mkdir: cannot create directory '/etc/freeswitch': File exists
chown: cannot access '/var/run/freeswitch': No such file or directory
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'freeswitch-systemd' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Job for freeswitch.service failed. See 'systemctl status freeswitch.service' and 'journalctl -xn' for details.

so I've run the ./debian/resources/switch.sh in attempt to trace down the issue, same result as above.

systemctl says:
root@fusion:/usr/src/fusionpbx-install.sh/debian# systemctl status freeswitch.service
● freeswitch.service - freeswitch
Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled)
Active: failed (Result: start-limit) since Thu 2017-06-01 22:03:28 EDT; 1min 23s ago
Process: 6143 ExecStartPre=/bin/mkdir -p /var/run/freeswitch/ (code=exited, status=214/SETSCHEDULER)

Jun 01 22:03:28 fusion systemd[1]: Unit freeswitch.service entered failed state.
Jun 01 22:03:28 fusion systemd[1]: freeswitch.service holdoff time over, scheduling restart.
Jun 01 22:03:28 fusion systemd[1]: Stopping freeswitch...
Jun 01 22:03:28 fusion systemd[1]: Starting freeswitch...
Jun 01 22:03:28 fusion systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
Jun 01 22:03:28 fusion systemd[1]: Failed to start freeswitch.
Jun 01 22:03:28 fusion systemd[1]: Unit freeswitch.service entered failed state.

and
root@fusion:/usr/src/fusionpbx-install.sh/debian# journalctl -xn
-- Logs begin at Thu 2017-06-01 17:47:08 EDT, end at Thu 2017-06-01 22:05:01 EDT. --
Jun 01 22:03:28 fusion systemd[1]: Unit freeswitch.service entered failed state.
Jun 01 22:03:28 fusion systemd[1]: freeswitch.service holdoff time over, scheduling restart.
Jun 01 22:03:28 fusion systemd[1]: Stopping freeswitch...
-- Subject: Unit freeswitch.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit freeswitch.service has begun shutting down.
Jun 01 22:03:28 fusion systemd[1]: Starting freeswitch...
-- Subject: Unit freeswitch.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit freeswitch.service has begun starting up.
Jun 01 22:03:28 fusion systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
Jun 01 22:03:28 fusion systemd[1]: Failed to start freeswitch.
-- Subject: Unit freeswitch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit freeswitch.service has failed.
--
-- The result is failed.
Jun 01 22:03:28 fusion systemd[1]: Unit freeswitch.service entered failed state.
Jun 01 22:05:01 fusion CRON[6190]: pam_unix(cron:session): session opened for user root by (uid=0)
Jun 01 22:05:01 fusion CRON[6191]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jun 01 22:05:01 fusion CRON[6190]: pam_unix(cron:session): session closed for user root


fusionpbx itself is up and running, just can't connect to fs for obvious reasons.

I'm stuck, any help would be greatly appreciated.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,043
565
113
kill any freeswitch process and try running it in the foreground, you should be able to spot any error messages:

Code:
/usr/bin/freeswitch -nonat -u www-data -g www-data -run /var/run/freeswitch

The real question is why it has failed in the first place. Is this virtualised or bare metal?
 

syadnom

New Member
Jun 2, 2017
6
0
1
44
It's in an openvz container (on ramnode)

output of the command:
root@fusion:~# /usr/bin/freeswitch -nonat -u www-data -g www-data -run /var/run/freeswitch
ERROR: Failed to set SCHED_FIFO scheduler (Operation not permitted)
Cannot open pid file /var/run/freeswitch/freeswitch.pid.

now, /var/run/freeswitch is 755 owner/group root, so I changed it to 777 and re-ran. now I'm scrolling this:
BEGIN EXCLUSIVE
2017-06-02 10:30:26.137297 [CRIT] switch_core_sqldb.c:1957 ERROR [attempt to write a readonly database]
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [attempt to write a readonly database]
BEGIN EXCLUSIVE
2017-06-02 10:30:26.137297 [CRIT] switch_core_sqldb.c:1957 ERROR [attempt to write a readonly database]
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [attempt to write a readonly database]
BEGIN EXCLUSIVE
2017-06-02 10:30:26.137297 [CRIT] switch_core_sqldb.c:1957 ERROR [attempt to write a readonly database]
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [attempt to write a readonly database]
BEGIN EXCLUSIVE
2017-06-02 10:30:26.137297 [CRIT] switch_core_sqldb.c:1957 ERROR [attempt to write a readonly database]
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2017-06-02 10:30:26.137297 [ERR] switch_core_sqldb.c:587 NATIVE SQL ERR [attempt to write a readonly database]
 

syadnom

New Member
Jun 2, 2017
6
0
1
44
I decided to run through it again after changing that permission
no changed:
root@fusion:/usr/src/fusionpbx-install.sh/debian# systemctl status freeswitch.service
● freeswitch.service - freeswitch
Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled)
Active: failed (Result: start-limit) since Fri 2017-06-02 10:32:42 EDT; 5min ago
Process: 9556 ExecStartPre=/bin/mkdir -p /var/run/freeswitch/ (code=exited, status=214/SETSCHEDULER)

Jun 02 10:32:42 fusion systemd[1]: Failed to start freeswitch.
Jun 02 10:32:42 fusion systemd[1]: Unit freeswitch.service entered failed state.
Jun 02 10:32:42 fusion systemd[1]: freeswitch.service holdoff time over, scheduling restart.
Jun 02 10:32:42 fusion systemd[1]: Stopping freeswitch...
Jun 02 10:32:42 fusion systemd[1]: Starting freeswitch...
Jun 02 10:32:42 fusion systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
Jun 02 10:32:42 fusion systemd[1]: Failed to start freeswitch.
Jun 02 10:32:42 fusion systemd[1]: Unit freeswitch.service entered failed state.
root@fusion:/usr/src/fusionpbx-install.sh/debian# journalctl -xn
-- Logs begin at Thu 2017-06-01 17:47:08 EDT, end at Fri 2017-06-02 10:35:02 EDT. --
Jun 02 10:32:42 fusion systemd[1]: Unit freeswitch.service entered failed state.
Jun 02 10:32:42 fusion systemd[1]: freeswitch.service holdoff time over, scheduling restart.
Jun 02 10:32:42 fusion systemd[1]: Stopping freeswitch...
-- Subject: Unit freeswitch.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit freeswitch.service has begun shutting down.
Jun 02 10:32:42 fusion systemd[1]: Starting freeswitch...
-- Subject: Unit freeswitch.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit freeswitch.service has begun starting up.
Jun 02 10:32:42 fusion systemd[1]: freeswitch.service start request repeated too quickly, refusing to start.
Jun 02 10:32:42 fusion systemd[1]: Failed to start freeswitch.
-- Subject: Unit freeswitch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit freeswitch.service has failed.
--
-- The result is failed.
Jun 02 10:32:42 fusion systemd[1]: Unit freeswitch.service entered failed state.
Jun 02 10:35:02 fusion CRON[9565]: pam_unix(cron:session): session opened for user root by (uid=0)
Jun 02 10:35:02 fusion CRON[9566]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jun 02 10:35:02 fusion CRON[9565]: pam_unix(cron:session): session closed for user root
 

syadnom

New Member
Jun 2, 2017
6
0
1
44
Very much not a centos fan, I like my Debian and it's also the dev platform for fusion.

I installed in a hyper-v instance and it went well. I'm thinking it's openvz specific.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,043
565
113
Very much not a centos fan, I like my Debian and it's also the dev platform for fusion.

I installed in a hyper-v instance and it went well. I'm thinking it's openvz specific.

It will be very openvz specific
 

Dan

Member
Jul 23, 2017
69
12
8
34
This is actually a really old and documented issue, in /lib/systemd/system/freeswitch.service there is a line that says CPUSchedulingPolicy=rr, which is all that is blocking Freeswitch from starting up.

Inside containers (like a chroot, OpenVZ or LXC), your ability to do things like kernel upgrades, set CPU priority and other tasks is not possible. Meanwhile, KVM & Xen will let you set CPU priority, but its probable that it won't have much effect on eventual task priority on the hypervisor itself. If your provider aggressively throttles CPU, you are apt to run into issues. Find good providers!
 
Status
Not open for further replies.