FreepPBX 15 - Asterisk crashes on reboot and must be started manually 06-19-2020

FreePBX 15 Distro Install
Asterisk 16.0.9.0

I have four machines have been working perfectly for several weeks before the latest FreePBX updates.
The machines were fully patched today 06-19-2020 to version 15.0.16.56.
Now on reboot, asterisk starts to load, then crashes.
I have version switched 1 server to Asterisk 13.21.1 Certified Asterisk
The version of Asterisk makes no difference as Asterisk still crashes on reboot.
This problem is replicated on 4 separate installs.
I have confirmed that Asterisk does start on the reboot.
However, it crashes within two minutes during the initial load.

asterisk -r

Asterisk 16.9.0, Copyright © 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

Connected to Asterisk 16.9.0 currently running on Server02 (pid = 11678)
CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

asterisk -r

Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

fwconsole restart
Starts Asterisk as expected and loads all modules.

Hi @fastdrw,

Try to first fix all PBX Folder and files permissions.

fwconole chown
fwconsole r --verbose
fwconsole restart

After permission check and fix doens’t help and you still facing with Asterisk Crash then try to Re-Install Asterisk.

asterisk-version-switch

Press 1 for Asterisk 13 (LTS) (With Opus and G729 codecs)
Press 2 for Asterisk 15 (With Opus and G729 codecs)
Press 3 for Asterisk 16 (LTS) (With Opus and G729 codecs)
Press 4 for Asterisk 13 Certified (LTS) (With Opus and G729 codecs)
Press 5 for Asterisk 17

Press 9 to exit and not change your Asterisk Version

Thanks for the response @shahin
[root@server04 ~]# fwconsole chown**
Taking too long? Customize the chown command
Setting Permissions

Setting base permissions
Done
Setting specific permissions

33377 [============================]
Finished setting permissions
[root@server04 ~]# fwconsole r --verbose
Reload Started
Reload Complete
[root@server04 ~]# asterisk -r
Asterisk 16.9.0, Copyright © 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
=========================================================================**
Connected to Asterisk 16.9.0 currently running on lcr04 (pid = 6687)
serverr04*CLI>

Everything restarts just fine when the server is up and running. The problem only manifests itself on “Reboot”.

When the server is rebooted, the following happens.

  1. Server starts up normally and starts Asterisk.
  2. Asterisk crashes prior to completing load up.
  3. Asterisk must be started manually > fwconsole restart

I have used the asterisk-version-switch to change versions from 16 to 13 but this makes no difference.

Hey quick question, is asterisk being started by systemd when booting up? For some reason my asterisk was starting via systemd on bootup and it was causing the same issue, I was never really sure why that happened but disabling it and making sure the freepbx.service was started at boot fixed it (it runs fwconsole start). It was a very strange issue.
Now if I check it it shows the service not running after boot since I disabled it, but it is running because fwconsole starts it, no more crashes for me, not sure if this is the case for you though.

[root@pbx ~]# systemctl status asterisk
● asterisk.service - LSB: Asterisk PBX
   Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

If its enabled
[root@pbx ~]# systemctl disable asterisk

systemctl enable freepbx in the event your worried it’s not enabled.

2 Likes

@scristopher71

SOLVED

On the four machines in question, I run the following command at root and the restart issue is fixed.

/sbin/chkconfig asterisk on

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.