TLDR VERSION:
Hi all,
I’m running FreePBX 17.0.25. After changing the External IP in the GUI and clicking Apply Config, I get:
Unknown Error. Please Run: fwconsole reload --verbose
On SSH:
/usr/sbin/fwconsole reload --verbose
It fails with:
-
Cron line added didn't remain in crontab on final check. Check /var/spool/asterisk/tmp/cron.error -
Stack trace points into
modules/timeconditions→updateCron()
/var/spool/asterisk/tmp/cron.error contains repeated:
"-":0: bad minute
errors in crontab file, can't install.
cron.service is running, but logs include:
(asterisk) ERROR (Missing newline before EOF, this crontab file will be ignored)
Most suspicious:
crontab -u asterisk -l
returns JSON output instead of cron lines (so the asterisk user’s crontab seems corrupted).
Questions:
-
Is it expected that FreePBX reload/apply config will fail as long as the asterisk crontab is invalid?
-
What’s the cleanest/official way to recover—reset the asterisk crontab and let FreePBX re-create its jobs, or is there a FreePBX-specific rebuild step?
Thanks!
DETAILED VERSION:
Hi FreePBX community,
I’m stuck with a reload/apply config failure on:
-
FreePBX 17.0.25
-
Debian-based system,
croninstalled and running
What happened
I changed the External IP in the FreePBX GUI and clicked Apply Config. Immediately got:
Unknown Error. Please Run: fwconsole reload --verbose
SSH output
/usr/sbin/fwconsole reload --verbose
It fails early with:
-
Cron line added didn't remain in crontab on final check. Check /var/spool/asterisk/tmp/cron.error -
Trace goes through:
-
BMO/Cron.class.php -
BMO/Job.class.php -
modules/timeconditions/Timeconditions.class.php: updateCron()
-
cron.error
"-":0: bad minute
errors in crontab file, can't install.
(repeated)
cron status
cron.service is active, but it also reports:
(asterisk) ERROR (Missing newline before EOF, this crontab file will be ignored)
Key detail
crontab -u asterisk -l
returns JSON instead of cron syntax, so the asterisk user’s crontab appears corrupted/invalid.
Permissions look normal (crontab binary and /var/spool/cron/crontabs exist with expected ownership/permissions).
Questions
-
Is it expected that FreePBX will fail
fwconsole reload(and therefore Apply Config) when theasteriskcrontab is invalid? -
What is the recommended recovery method: remove/reset the
asteriskcrontab and let FreePBX recreate its job entries, or is there a specific FreePBX “rebuild cron/jobs” procedure? -
Any known causes for JSON ending up in the
asteriskcrontab (module, script, firewall tool, etc.)?
Happy to provide more outputs if needed (e.g. fwconsole ma list, /var/spool/cron/crontabs/asterisk content, etc.).
Thanks in advance!
