Unable to locate the FreePBX BMO Class Userman

On a pbx, version 12.7.8 when I click Apply config, I get an error message. There was an error during reload: Unknown Error. Please Run: fwconsole reload --verbose

I run that and get this:

fwconsole reload --verbose
Reload Started

In Self_Helper.class.php line 212:

[Exception (404)]
Unable to locate the FreePBX BMO Class 'Userman’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install userman 2) fwconsole ma enable userman

Exception trace:
() at /var/www/html/admin/libraries/BMO/Self_Helper.class.php:212
FreePBX\Self_Helper->loadObject() at /var/www/html/admin/libraries/BMO/Self_Helper.class.php:106
FreePBX\Self_Helper->autoLoad() at /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
FreePBX\Self_Helper->__get() at /var/www/html/admin/modules/callaccounting/Callaccounting.class.php:19
FreePBX\modules\Callaccounting->__construct() at /var/www/html/admin/libraries/BMO/Self_Helper.class.php:124
FreePBX\Self_Helper->autoLoad() at /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
FreePBX\Self_Helper->__get() at /var/www/html/admin/libraries/BMO/Hooks.class.php:393
FreePBX\Hooks->preloadBMOModules() at /var/www/html/admin/libraries/BMO/Hooks.class.php:39
FreePBX\Hooks->updateBMOHooks() at /var/www/html/admin/libraries/Console/Reload.class.php:125
FreePBX\Console\Command\Reload->reload() at /var/www/html/admin/libraries/Console/Reload.class.php:91
FreePBX\Console\Command\Reload->execute() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:960
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:255
Symfony\Component\Console\Application->doRun() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /var/lib/asterisk/bin/fwconsole:163

So I run fwconsole ma install userman and get this:

In Cron.class.php line 126:

Cron line added didn’t remain in crontab on final check. Check /tmp/cron.error for reason.

And the log shows this:

crontab: error renaming /var/spool/cron/#tmp.companyname.myphonesystem.com.XXXX9pUPMw to /var/spool/cron/asterisk
rename: Operation not permitted

I’ve also ran upgradeall and it also gives the Self_Help.class.php line 212 Unable to locate Freepbx BMO class 'Userman" error

What’s the next step to try?

fwconsole ma downloadinstall userman --force

That doesn’t work either.

fwconsole ma downloadinstall userman --force
No repos specified, using: [standard,commercial] from last GUI settings

Downloading module ‘userman’

In Self_Helper.class.php line 212:

Unable to locate the FreePBX BMO Class 'Userman’A required module might be disabled or uninstalled. Rec
ommended steps (run from the CLI): 1) fwconsole ma install userman 2) fwconsole ma enable userman

moduleadmin [-f|–force] [-d|–debug] [–edge] [–ignorecache] [–stable] [–color] [–skipchown] [-e|–autoenable] [–skipdisabled] [–snapshot SNAPSHOT] [–format FORMAT] [-R|–repo REPO] [-t|–tag TAG] [–skipbreakingcheck] [–sendemail] [–onlystdout] [–] []…

I ran
fwconsole ma downloadinstall userman --edge --tag 15.0.14
Edge repository temporarily enabled
No repos specified, using: [standard,commercial] from last GUI settings

Starting module download from https://mirror.freepbx.org/modules/packages/userman/userman-15.0.14.tgz.gpg
Processing
Downloading…
393303/393303 [============================] 100%
Finished downloading
Extracting…Done
Module https://mirror.freepbx.org/modules/packages/userman/userman-15.0.14.tgz.gpg successfully downloaded
Updating tables userman_users, userman_users_settings, userman_groups, userman_groups_settings, userman_directories…Done
Generating CSS…Done
Module userman version 15.0.14 successfully installed
Updating Hooks…Done
Chowning directories…Done
Resetting temporarily repository state

But I still get:

fwconsole ma upgradeall
No repos specified, using: [standard,commercial] from last GUI settings

Module(s) requiring upgrades: queuestats, userman
Upgrading module ‘queuestats’ from 15.0.14 to 15.0.14
Downloading module ‘queuestats’
Processing queuestats
Verifying local module download…Verified
Extracting…Done
Download completed in 0 seconds
Updating tables qs_queuestats, qs_callstats, qs_livestats, qs_agentstats, qs_agentlog…Done

In Cron.class.php line 126:

Cron line added didn’t remain in crontab on final check. Check /tmp/cron.error for reason.

The cron.error shows:

crontab: error renaming /var/spool/cron/#tmp.companyname.myphonesystem.com.XXXX52iJ2u to /var/spool/cron/asterisk
rename: Operation not permitted

So it appears to be a permissions issue? I’m not good enough at linux to know tho.

image

Wrong permissions. Do fwconsole chown which will fix permissions.

I did. Same error.

fwconsole chown
Taking too long? Customize the chown command, See Sangoma Documentation
Setting Permissions…

In Self_Helper.class.php line 212:

Unable to locate the FreePBX BMO Class 'Userman’A required module might be disabled or uninstalled. Rec
ommended steps (run from the CLI): 1) fwconsole ma install userman 2) fwconsole ma enable userman

And you can’t enable that module now? Or upgrade it?

Correct.

I tried rm -f /tmp/cron.error
and then I decided to try to reinstall the current version of userman and that seems to succeed.

[root@solect ~]# fwconsole ma downloadinstall userman --tag 15.0.13
No repos specified, using: [standard,commercial] from last GUI settings

Starting module download from https://mirror.freepbx.org/modules/packages/userman/userman-15.0.13.tgz.gpg
Processing
Downloading…
393258/393258 [============================] 100%
Finished downloading
Extracting…Done
Module https://mirror.freepbx.org/modules/packages/userman/userman-15.0.13.tgz.gpg successfully downloaded
Updating tables userman_users, userman_users_settings, userman_groups, userman_groups_settings, userman_directories…Done
Generating CSS…Done
Module userman version 15.0.13 successfully installed
Updating Hooks…Done
Chowning directories…Done
[root@solect ~]# fwconsole chown
Taking too long? Customize the chown command, See Sangoma Documentation
Setting Permissions…
Setting base permissions…Done in 8 seconds
Setting specific permissions…
101486 [============================]

However, Apply Config still doesn’t apply. :frowning:
I ran refreshsignatures as well and now I’m restarting it again.

Does this look correct?

crontab -u asterisk -e

8 2 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null
ntab -u asterisk -e

8 2 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null

          • [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM%30)) && /usr/sbin/fwconsole job --run --quiet 2>&1 > /dev/null
  • 2 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
    14 7 * * 6 [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole ma listonline --sendemail -q > /dev/null 2>&1
    14 8 * * 6 [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole sys listonline --sendemail -q > /dev/null 2>&1
    ~
    ~
    ~
    ~

Solved it by doing clean reinstall and restore from backup. 4.5hr later… :frowning: