SSH Backup to Backup Server - No GUI Now

Hey everyone,

So an SSH backup was performed today to our backup PBX. Once it completed we lost access to the web gui (on backup server) and it displays an HTTP 500 error. I’ve searched for similar issues but none have successfully resolved the issue.

I have tried amportal chown but that did not make a different.

If I try to upgrade modules from the command line I get the following:

PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Unable to locate the FreePBX BMO Class ‘Userman’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install userman 2) amportal a ma enable userman’ in /var/www/html/admin/libraries/BMO/Self_Helper.class.php:205
Stack trace:
#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(100): Self_Helper->loadObject(‘Userman’)
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(36): Self_Helper->autoLoad(‘Userman’)
#2 /var/www/html/admin/modules/userman/functions.inc.php(6): Self_Helper->__get(‘Userman’)
#3 /var/www/html/admin/modules/restapi/functions.inc/userman_hooks.php(20): setup_userman()
#4 /var/www/html/admin/modules/restapi/functions.inc.php(15): require_once(’/var/www/html/a…’)
#5 /var/www/html/admin/bootstrap.php(212): require_once(’/var/www/html/a…’)
#6 /etc/freepbx.conf(9): require_once(’/var/www/html/a…’)
#7 /var/lib/asterisk/bin/module_admin(15): include_once(’/etc/freepbx.co…’)
#8 {ma in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 205

In the HTTP logs I see it as well:

[Thu Sep 07 14:42:03 2017] [error] [client 24.96.209.3] PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Unable to locate the FreePBX BMO Class ‘Userman’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install userman 2) amportal a ma enable userman’ in /var/www/html/admin/libraries/BMO/Self_Helper.class.php:205\nStack trace:\n#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(100): Self_Helper->loadObject(‘Userman’)\n#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(36): Self_Helper->autoLoad(‘Userman’)\n#2 /var/www/html/admin/modules/userman/functions.inc.php(6): Self_Helper->__get(‘Userman’)\n#3 /var/www/html/admin/modules/restapi/functions.inc/userman_hooks.php(20): setup_userman()\n#4 /var/www/html/admin/modules/restapi/functions.inc.php(15): require_once(’/var/www/html/a…’)\n#5 /var/www/html/admin/bootstrap.php(212): require_once(’/var/www/html/a…’)\n#6 /etc/freepbx.conf(9): require_once(’/var/www/html/a…’)\n#7 /var/www/html/admin/config.php(99): include_once(’/etc/freepbx.co…’)\n#8 {main}\n in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 205

Any thoughts on how I can get back into the GUI? Both servers are the same (hardware and software) and they are the FreePBX12 distro 12.0.76.4

Thanks for any help!

Just to add, I did try the recommended steps that is said but it just tells me the same thing.

Your warm spare isn’t running the same version (and some modules)
Both servers have to be running the same versions.
When you do updates, you have to do on both at the same time.

See wiki for exact details.

Thanks for the response. I am aware that they need to be the same and both servers have been running fine and backing up for over a year now. No one should have updated just one but anything is possible.

Either way, does anyone have any tips on how to get the GUI working again?

It appears that user manager is not installed. From bash:

fwconsole ma list | grep userman

if it is not installed, try

fwconsole ma install userman

This is FreePBX 12 asterisk 11 so I do not have fwconsole. I have verified the userman directory is under /var/www/html/admin/modules. When I try installing userman or even an upgradeall I receive the same message as above. Even trying amportal a ma enable userman gives the same error.

PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Unable to locate the FreePBX BMO Class ‘Userman’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install userman 2) amportal a ma enable userman’ in /var/www/html/admin/libraries/BMO/Self_Helper.class.php:205
Stack trace:
#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(100): Self_Helper->loadObject(‘Userman’)
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(36): Self_Helper->autoLoad(‘Userman’)
#2 /var/www/html/admin/modules/userman/functions.inc.php(6): Self_Helper->__get(‘Userman’)
#3 /var/www/html/admin/modules/restapi/functions.inc/userman_hooks.php(20): setup_userman()
#4 /var/www/html/admin/modules/restapi/functions.inc.php(15): require_once(’/var/www/html/a…’)
#5 /var/www/html/admin/bootstrap.php(212): require_once(’/var/www/html/a…’)
#6 /etc/freepbx.conf(9): require_once(’/var/www/html/a…’)
#7 /var/lib/asterisk/bin/module_admin(15): include_once(’/etc/freepbx.co…’)
#8 {ma in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 205

I’m pretty sure you do - amportal was deprecated back in 1.8 (IIRC), and I’m reasonably certain it was replaced with fwconsole in FreePBX 11.

[[email protected] ~]# fwconsole
-bash: fwconsole: command not found

That’s what I get when I enter the command. I just checked 2 other boxes that have the same version of FreePBX and still receive command not found. I have always used amportal until FreePBX 13. Maybe I do not have it enabled?

I just checked my distro version 11/11 system and fwconsole is there. Weird.

Well I got back into the GUI. I removed the userman directory from /var/www/html/admin/modules
Now it reports I have 3 broken modules: bria, cxpanel, userman
I issued:
[[email protected] asterisk]# amportal a ma download userman
Fetching FreePBX settings with gen_amp_conf.php…
Found module locally, verifying…Verified. Using Local

Untaring…Done
Module userman successfully downloaded

I then install userman using:
[[email protected] asterisk]# amportal a ma install userman
Fetching FreePBX settings with gen_amp_conf.php…

HP Fatal error: Uncaught exception ‘Exception’ with message ‘Unable to locate the FreePBX BMO Class ‘Userman’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install userman 2) amportal a ma enable userman’ in /var/www/html/admin/libraries/BMO/Self_Helper.class.php:205
Stack trace:
#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(100): Self_Helper->loadObject(‘Userman’)
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(36): Self_Helper->autoLoad(‘Userman’)
#2 /var/www/html/admin/modules/userman/functions.inc.php(6): Self_Helper->__get(‘Userman’)
#3 /var/www/html/admin/modules/restapi/functions.inc/userman_hooks.php(20): setup_userman()
#4 /var/www/html/admin/modules/restapi/functions.inc.php(15): require_once(’/var/www/html/a…’)
#5 /var/www/html/admin/bootstrap.php(212): require_once(’/var/www/html/a…’)
#6 /etc/freepbx.conf(9): require_once(’/var/www/html/a…’)
#7 /var/lib/asterisk/bin/module_admin(15): include_once(’/etc/freepbx.co…’)
#8 {ma in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 205

Which brings me back to no GUI once that is done. Delete userman directory and I can get back in, but unable to reload due to: Reload failed because retrieve_conf encountered an error: 255

Try this:

amportal a ma install userman --force

I think I got it. I went through dependency hell disabling quite a few modules to uninstall via module admin. Finally got userman uninstalled and I reinstalled via CLI. Was able to successfully reload so now im going to upgrade both servers and attempt another backup.

All is good now. Thanks everyone!