Failure to Apply Config

I just upgraded FreePBX to 15.0.11, and I can’t press “Apply Config” because when I do, I get this message: Unknown Error. Please Run: fwconsole reload --verbose I’ve run that command at least 10 times, nothing changes.

Also, when running the above command, this error message comes back: [Exception] Cron line added didn't remain in crontab on final check. Check /tmp/cron.error for reason.

And what does it say?

This is what it says:

[[email protected] ~]# /tmp/cron.error
/tmp/cron.error: line 1: -:22:: command not found
/tmp/cron.error: line 2: errors: command not found
/tmp/cron.error: line 5: -:22:: command not found
/tmp/cron.error: line 6: errors: command not found
/tmp/cron.error: line 9: -:22:: command not found
/tmp/cron.error: line 10: errors: command not found
/tmp/cron.error: line 13: -:22:: command not found
/tmp/cron.error: line 14: errors: command not found
/tmp/cron.error: line 17: -:22:: command not found
/tmp/cron.error: line 18: errors: command not found
/tmp/cron.error: line 21: -:22:: command not found
/tmp/cron.error: line 22: errors: command not found
/tmp/cron.error: line 25: -:22:: command not found
/tmp/cron.error: line 26: unexpected EOF while looking for matching `''
/tmp/cron.error: line 27: syntax error: unexpected end of file

You’ve actually attempted to execute the file. To view a file’s contents use:

cat /tmp/cron.error

to share with us via a URL, pipe to pastebin like:

cat /tmp/cron.error | pastebin

Okay then, here’s what I got from running that:

[[email protected] ~]# cat /tmp/cron.error
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.
"-":22: bad day-of-month
errors in crontab file, can't install.

What is output of

crontab -l -uasterisk
    [[email protected] ~]# crontab -l -uasterisk
    * * * * * [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
    */1 * * * * /var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null
    */15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
    @daily /usr/sbin/fwconsole pms mk_dirty > /dev/null 2>&1
    * * * * * /usr/sbin/fwconsole pms wu_alert > /dev/null 2>&1
    */5 * * * * /usr/sbin/fwconsole qxactreports --sync -q 2>&1 > /dev/null
    * * * * * [ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php
    @daily [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php >/dev/null 2>&1
    @daily [ -x /var/lib/asterisk/agi-bin/ddns_client.php ] && /var/lib/asterisk/agi-bin/ddns_client.php >/dev/null 2>&1
    @hourly [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php >/dev/null 2>&1
    30 23 23 * * /usr/sbin/fwconsole backup --backup=27df0174-38fc-4396-8788-98a58d04576d > /dev/null 2>&1
    */1 * * * * /usr/sbin/fwconsole calendar --sync 2>&1 > /dev/null
    11 2 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null
    * * * * * /usr/sbin/fwconsole queuestats --syncall >> /tmp/reader.log 2>&1
    30 22 * * * /usr/sbin/fwconsole recordingreports -s -c -q > /dev/null 2>&1
    0 0 1 * * php /var/lib/asterisk/agi-bin/backuprecordings.php > /dev/null 2>&1
    @daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check 2>&1 > /dev/null
    */15 * * * * /usr/sbin/fwconsole userman --syncall -q
    * * * * * php /var/lib/asterisk/bin/vqplus_generate_periodical_events.php > /dev/null 2>&1
    * 5 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
    @daily [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay

Try ‘crontab -e -uasterisk’

Look at the lines and see the lines in your file say “&” instead of “&”. I doubt it, but if it does, that’s your problem.

Nope, they all say “&” like they’re supposed to. So that rules that out as the issue, but this is really stumping me. What could it be? I have some changes I made that need to be applied, and I still can’t press “Apply Config” without it returning the same error that started this thread.

There are only 21 lines in your current crontab, so whatever is getting added to the crontab is causing a problem.

Try this:
crontab -e -u asterisk
press “G”
press “A”
press “enter”
press “escape”
press “ZZ”

Spelling is important, so is case.

Try your fwconsole reload --verbose again and let us know if that helped.

Unfortunately no. I’m still getting the same error message!

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