Asterisk doesn't restart after power loss. FreePBX 15.0.37.9

Hi, any time the pbx loses power upon automatic restart FreePBX loads but asterisk does not.
I’m monitoring asterisk in PRTG.
I have to console in and run fwconsole -restart to bring it back up which works.

Unfortunately it seems the logs only log when asterisk is running so I’m not sure how to diagnose this issue.

Can I ask the fine community for advice and help on this, I’m happy to provide further information to assist in the diagnosis.

Thanks

At some time Sangoma published a broken pair of

/usr/lib/systemd/system/freepbx.service
/usr/lib/systemd/system/freepbx.service

Where FreePBX and hence Asterisk was told to start after apache2, and Apache2 was told to startt after FreePBX, which is strange becuse neither needs the other. I am not sure that they have fixed it yet though.

Thanks Dicko, so I’m not alone with this problem? Is there a published fix for it you can reference?

I don’t know about a publshed fix but commenting out the reference to Freepbx in the apache2 service file and vice versa , then

systemctl daemon-reload; reboot

works for me

1 Like

This is the contents of Freepbx.service - Do I need to comment out any of these? I cannot find an apache2 file in the same directory.

[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
After=httpd.service
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start
ExecStop=/usr/sbin/fwconsole stop

[Install]
WantedBy=multi-user.target

That doesn’t look like FreePBX 17 which is Debian based, there the default webserver is apache2 not httpd. I apologize for misleading you.

It’s FreePBX 15.0.37.9

Kinda EOL, think about updating.

You are right, I really should. I have tried and found it not as simple as the documentation makes out.

I’ll have another go.

Last time I took a backup

Spun up 17 on other hardware and restored the backup.

Will I need to re-register the users samgoma connect on their mobile devices?

Sorry, I don’t use commercial modules,

Ok, thanks for the advice, appreciated as always!