New installation issues - retrieve_conf failed, update your modules and reload Asterisk

I am having trouble with new installation of FreePBX 14. After scouring forums for long time and finding no solution where I am. I am encountering some issues that seem to be common but no with definitive reason. After successful install retrieve_config fails.

When I run fwconsole retrieve_config I receive:

“Please update your modules and reload Asterisk by browsing to your server.”

When I click “Apply Config” I receive:

exit: 255
Unable to continue. Cron line added didn’t remain in crontab on final check. Check /tmp/cron.error for reason. in /var/lib/asterisk/pbx/admin/libraries/BMO/Cron.class.php on line 117
#0 /var/lib/asterisk/pbx/admin/modules/dashboard/Dashboard.class.php(113): FreePBX\Cron->addLine(’* * * * * [ -x …’)
#1 /var/lib/asterisk/pbx/admin/libraries/BMO/DialplanHooks.class.php(107): Dashboard->doDialplanHook(Object(extensions), ‘asterisk’, 500)
#2 /var/lib/asterisk/bin/retrieve_conf(861): FreePBX\DialplanHooks->processHooks(‘asterisk’, Array)
#3 {main}

I have verified the install created asterisk crontab, it is not corrupt

I have done several full/clean installs, same thing every time

Any help is appreciated

Debian 9.3
Asterisk 15.2.0
Apache 2.4.25 - separate/dedicated instance running as asterisk
PHP5.6 FPM - separate/dedicated instance running as asterisk
MariaDB 10.1.26

You need to add a line to crontab manually to see if it accepts and stays

crontab -u asterisk -e

15 3 * * * /usr/sbin/fwconsole certificates updateall -q
*/15 * * * * /usr/sbin/fwconsole userman --syncall -q

          • [ -x /var/lib/asterisk/pbx/admin/modules/dashboard/scheduler.php ] && /var/lib/asterisk/pbx/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
            59 * * * * /var/lib/asterisk/bin/freepbx-cron-scheduler.php
            7 * * * * /usr/sbin/fwconsole util cleanplaybackcache -q

I am able edit and save with nano, do I have reload after edit?

Perform the command as the asterisk user.

sudo -u asterisk crontab -u asterisk -e
crontabs/asterisk/: fdopen: Permission denied

…but asterisk has rw permissions on file

is this corrupt, or permissions issue?

confusingly the asterisk user doesn’t have direct access to crontab, as root just

crontab -u asterisk -e

or as the asterisk user

crontab -e

There does not seem to be any issues when running crontab -u asterisk -e from root. I can edit and save asterisk crontab file, so it does not seem to be corrupt. Is this a known issue with workaround? Place asterisk user in crontab group?

The apache user “Asterisk” needs to be able to access it’s own crons.

Please clarify how. The user asterisk (which runs apache instance) already has RW premissions to /var/spool/cron/crontabs/asterisk.

You are using debian. I have no idea. You are the one that said you can’t execute it as the Asterisk user.

Thanks. You are right, not issue with freepbx. Changed ownership of /var/spool/cron/crontabs to root.crontab from root.root. No more issues.

I believe the file:


should have ownership and permissions fixed by 'fwconsole chown'. If not, file a feature request to add it.