When trying to upgrade Sysadmin from 188.8.131.52 to 184.108.40.206 I get the following error:
amportal a ma install sysadmin
Fetching FreePBX settings with gen_amp_conf.php…
PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Cron line added didn’t remain in crontab on final check’ in /var/www/html/admin/libraries/BMO/Cron.class.php:99
#0 /var/www/html/admin/libraries/BMO/Cron.class.php(189): Cron->addLine(’@daily [ -e /v…’)
#1 /var/www/html/admin/modules/sysadmin/install.php(91): Cron->add(Array)
#2 /var/www/html/admin/libraries/modulefunctions.class.php(2288): include_once(’/var/www/html/a…’)
#3 /var/www/html/admin/libraries/modulefunctions.class.php(2240): module_functions->_doinclude(’/var/www/html/a…’, ‘sysadmin’)
#4 /var/www/html/admin/libraries/modulefunctions.class.php(1799): module_functions->_runscripts(‘sysadmin’, ‘install’, Array)
#5 /var/lib/asterisk/bin/module_admin(68): module_functions->install(‘sysadmin’, false)
#6 /var/lib/asterisk/bin/module_admin(840): doInstall(‘sysadmin’, false)
thrown in /var/www/html/admin/libraries/BMO/Cron.class.php on line 99
I’m currently running:
Haven’t been able to find any hints on the web or this forum yet. Any help would be greatly appreciated.
I too have this problem and cannot do anything to get it resolved. Yours is the only post I’ve found that lists the issue. Happened after I ran the upgrade scripts to .17 from the sysadminpro module. After it completed, sysadmin was disabled and I could not upgrade/enable it.
I found the solution to my own problem. I hope this helps you:
I was able to resolve it by doing the following from an SSH CLI session logged in as root:
1.) I attempted to manually enable sysadmin and was unsuccessful ( amportal a ma enable sysadmin)
2.) I was unable to delete sysadmin because of dependencies (amportal a ma -f delete sysadmin)
3.) I decided to remove all modules to eliminate the dependency problems. This worked, with some errors. (amportal a ma deleteall)
4.) I then reinstalled all modules. This worked, with some dependency failures (amportal a ma installall)
5.) I then was able to log back into the web GUI and update/install all failed modules from the module admin page. This worked without any errors. All settings remained intact, and the updated version of Sysadmin was installed and functional.
I hope this helps you.
Hi DH, thanks for getting back to me.
The process you detail above is exactly what I did on my system (deleteall and installall). Everything worked after that, except that I couldn’t install the sysadmin module again. I can download it but when trying to install it I get the error that references the crontab entry.
Any idea what the crontab error is all about?
I’m not sure what the error means, but I did notice that a fully upgraded system was necessary to reinstall an updated sysadmin. I’d first try reinstalling all modules from the module admin page (make sure you’re including the extended modules, as some of your old PBX settings likely depend on them), and make sure your framework is up to date. I hope this helps,
Oh, I missed this one. The error is this:
‘Cron line added didn’t remain in crontab on final check’
Sysadmin tried to add a line to cron, cron didn’t say there was an error, but when we double checked before we returned, that line WASN’T THERE.
I’d have a look for corruption in your crontab - can you please paste the output of
crontab -l -u asterisk here?
Thanks for the hint. When I ran the crontab command it didn’t work. After looking at the issue a bit closer I found that Crontab was no longer installed on my system for some odd reason. Not sure if the upgrade messed something up or what. What I ended up doing was just installing Crontab again using ‘yum install crontabs’
Very strange, the Crontab command and packages were missing from my system but all my cron jobs were still there.
After installing Crontab I was able to install the sysadmin module without any issue.