Apply config | fwconsole ma reload not working!

Anytime is click “apply config” on GUI or run fwconsole ma reload, I receive error below.

fwconsole reload --verbose
locale: Cannot set LC_CTYPE to default locale: No such file or directory
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Unable to continue. Unable to locate the FreePBX BMO Class 'Pm2'A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install pm2 2) fwconsole ma enable pm2 in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 213
#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(106): FreePBX\Self_Helper->loadObject('Pm2')
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(37): FreePBX\Self_Helper->autoLoad('Pm2')
#2 /var/www/html/admin/modules/iotserver/Iotserver.class.php(75): FreePBX\Self_Helper->__get('Pm2')
#3 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(124): FreePBX\modules\Iotserver->__construct(Object(FreePBX))
#4 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(37): FreePBX\Self_Helper->autoLoad('Iotserver')
#5 /var/www/html/admin/libraries/BMO/Hooks.class.php(298): FreePBX\Self_Helper->__get('Iotserver')
#6 /var/www/html/admin/libraries/BMO/Hooks.class.php(39): FreePBX\Hooks->preloadBMOModules()
#7 /var/lib/asterisk/bin/retrieve_conf(81): FreePBX\Hooks->updateBMOHooks()
#8 {main}

When tried installing PM2, then I got this:

fwconsole ma install pm2
locale: Cannot set LC_CTYPE to default locale: No such file or directory
Installing/Updating Required Libraries. This may take a while...The following messages are ONLY FOR DEBUGGING. Ignore anything that says 'WARN' or is just a warning
Found npm-cache v0.7.0
Running installation..
[npm-cache] [INFO] using /home/asterisk/.package_cache as cache directory
[npm-cache] [INFO] [composer] Dependency config file /var/www/html/admin/modules/pm2/node/composer.json does not exist. Skipping install
[npm-cache] [INFO] [npm] config file exists
[npm-cache] [INFO] [npm] cli exists
[npm-cache] [INFO] [npm] hash of /var/www/html/admin/modules/pm2/node/package.json: 5779f23338cdda82e1a9b20b2c91dde3
[npm-cache] [INFO] [npm] running [npm install]...
npm ERR! errno ETIMEDOUT
npm ERR! network request to failed, reason: connect ETIMEDOUT
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/asterisk/.npm/_logs/2022-08-07T05_00_10_976Z-debug.log
[npm-cache] [ERROR] [npm] error running npm install
[npm-cache] [ERROR] error installing dependencies

Finished updating libraries!

There was an error installing. Please review the install log. (/var/www/html/admin/modules/pm2/node/logs/install.log)
Unable to install module pm2:
 - Failed to run installation scripts
Updating Hooks...Done

When I checked the repo setting:

fwconsole setting MODULE_REPO
locale: Cannot set LC_CTYPE to default locale: No such file or directory
Setting of "MODULE_REPO" is (text)[]

The main issue here is that, since I was unable to run fwconsole ma reload command, the old repo setting ( still persists. What can I do to point pbx to the right repo. Also, can I run a wget command to fetch module directly from

Please help

Npm is not able to install the libraries’s dependencies. As stated in the error, check out there is no proxy in the middle when sending traffic out, and if there is one you will have to have the proper config on the server.

There is not proxy in between…

You neglected the fact that is unreachable. And that is meant to be the primary reppo.

Like I said I am not able apply config both on GUI and cli. This is the reason the did not work

Is there anyway I can bypass the use of mirror1 as the primary repo?

What is the output of this?

fwconsole setting MODULE_REPO

If it is not the correct repo, you can set it by specifying.

fwconsole setting MODULE_REPO

The output is

See it in the post.

The main issue is that I need to run fwconsole reload for it to take effect. But I get error message (see my first output).

Due to the error and inability to apply the setting, the mirror in use is the old config of

Is there a way to use wget to get the package?

looks like pm2 module fetching packages from the mirror1 server and as per below error it looks failed to connect. does your network settings to reach to is good?

npm ERR! network request to failed, reason: connect ETIMEDOUT

You could confirm , networking is good or not by running below command -

As there are multiple packages which pm2 needs to download so If above works fine then try to install the pm2 module again.


I have been able to resolve the issue.

I had a static dns entry on my firewall point to This was configured in 2 years ago. Obviously the IP has changed to

pm2 is successfully installed. PBX is working fine.


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