Error updating pm2 module

Hello,

When trying to update the Process Management (pm2) module from 13.0.4.2 to 13.0.5 via the gui on one of our PBXes I get the following message:

If I copy/paste all the text in the back box, then the full message is:

=$HOME/.node/share/man:$MANPATH &&
/var/www/html/admin/modules/pm2/node/node_modules/pm2/bin/pm2 ping" failed. Exit Code: 1(General error) Output: ================ Error Output: ================ module.js:338 throw err; ^ Error: Cannot find module ‘./internal/slice’ at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/var/www/html/admin/modules/pm2/node/node_modules/pm2/node_modules/async/apply.js:15:14) at Module._compile (module.js:460:26) at Object.Module._extensions…js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17)

/var/www/html/admin/libraries/Composer/vendor/symfony/process/Symfony/Component/Process/Process.php
public function mustRun($callback = null)
{
if ($this->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) {
throw new RuntimeException(‘This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.’);
}

   if (0 !== $this->run($callback)) {
       throw new ProcessFailedException($this);
  }

I have also tried updating via command line using fwconsole ma downloadinstall pm2:

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

Starting pm2 download…
Processing pm2
Verifying local module download…Verified
Extracting…Done
Module pm2 successfully downloaded
Installing/Updating Required Libraries. This may take a while…The following me ssages are ONLY FOR DEBUGGING. Ignore anything that says ‘WARN’ or is just a war ning
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.js on: d533e5835beb0c379c4c571fb8ceaecc
[npm-cache] [INFO] [npm] cache exists
[npm-cache] [INFO] [npm] clearing installed dependencies at /var/www/html/admin/ modules/pm2/node/node_modules
[npm-cache] [INFO] [npm] …cleared
[npm-cache] [INFO] [npm] retrieving dependencies from /home/asterisk/.package_ca che/npm/2.15.11/d533e5835beb0c379c4c571fb8ceaecc.tar.gz
[npm-cache] [INFO] [bower] Dependency config file /var/www/html/admin/modules/pm 2/node/bower.json does not exist. Skipping install
[npm-cache] [INFO] [npm] done extracting
[npm-cache] [INFO] successfully installed all dependencies

Finished updating libraries!

[Symfony\Component\Process\Exception\ProcessFailedException]
The command “runuser ‘asterisk’ -s ‘/bin/bash’ -c ‘cd /var/www/html/admin/m
odules/pm2/node && mkdir -p /home/asterisk/.pm2 && mkdir -p /var/www/html/a
dmin/modules/pm2/node/logs && export HOME=/home/asterisk && export PM2_HOME
=/home/asterisk/.pm2 && export ASTLOGDIR=/var/log/asterisk && export ASTVAR
LIBDIR=/var/lib/asterisk && export PATH=$HOME/.node/bin:$PATH && export NOD
E_PATH=$HOME/.node/lib/node_modules:$NODE_PATH && export MANPATH=$HOME/.nod
e/share/man:$MANPATH && /var/www/html/admin/modules/pm2/node/node_modules/p
m2/bin/pm2 ping’” failed.
Exit Code: 1(General error)
Output:
================
Error Output:
================
module.js:338
throw err;
^
Error: Cannot find module ‘./internal/slice’
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/var/www/html/admin/modules/pm2/node/node_module
s/pm2/node_modules/async/apply.js:15:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)

ma [-f|–force] [-d|–debug] [–edge] [–color] [–skipchown] [-e|–autoenable] [–skipdisabled] [–snapshot=“…”] [–format=“…”] [-R|–repo=“…”] [-t|–tag =“…”] [args1] … [argsN]

Results of fwconsole ma checkdepends pm2:

All dependencies met for module pm2

Resultes of fwconsole ma showupgrades:

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

Upgradable:
±-------±--------------±---------------+
| Module | Local Version | Online Version |
±-------±--------------±---------------+
| pm2 | 13.0.5 | 13.0.5 |
| xmpp | 13.0.17.9 | 13.0.17.13 |
±-------±--------------±---------------+

Results of fwconsole ma refreshsignatures:

Getting Data from Online Server…
Done
Checking Signatures of Modules…
Checking accountcodepreserve…
Good
Checking announcement…
Good
Checking arimanager…
Good
Checking asterisk-cli…
Good
Checking asteriskinfo…
Good
Checking backup…
Good
Checking blacklist…
Good
Checking builtin…
Signature Invalid
Could not find signed module on remote server!
Checking bulkdids…
Good
Checking bulkextensions…
Good
Checking bulkhandler…
Good
Checking callback…
Good
Checking callforward…
Good
Checking callrecording…
Good
Checking callwaiting…
Good
Checking campon…
Good
Checking cdr…
Good
Checking cel…
Good
Checking certman…
Good
Checking conferences…
Good
Checking configedit…
Good
Checking contactmanager…
Good
Checking core…
Good
Checking customappsreg…
Good
Checking cxpanel…
Good
Checking dashboard…
Good
Checking daynight…
Good
Checking dictate…
Good
Checking digium_phones…
Good
Checking digiumaddoninstaller…
Good
Checking disa…
Good
Checking donotdisturb…
Good
Checking endpoint…
Good
Checking extensionroutes…
Good
Checking fax…
Good
Checking featurecodeadmin…
Good
Checking findmefollow…
Good
Checking firewall…
Good
Checking framework…
Good
Checking fw_langpacks…
Good
Checking hotelwakeup…
Good
Checking iaxsettings…
Good
Checking infoservices…
Good
Checking irc…
Good
Checking ivr…
Good
Checking languages…
Good
Checking logfiles…
Good
Checking manager…
Good
Checking miscapps…
Good
Checking miscdests…
Good
Checking music…
Good
Checking outroutemsg…
Good
Checking paging…
Good
Checking parking…
Good
Checking phonebook…
Good
Checking phpinfo…
Good
Checking pinsets…
Good
Checking presencestate…
Good
Checking printextensions…
Good
Checking queueprio…
Good
Checking queues…
Good
Checking recordings…
Good
Checking restapi…
Good
Checking ringgroups…
Good
Checking setcid…
Good
Checking sipsettings…
Good
Checking soundlang…
Good
Checking superfecta…
Good
Checking sysadmin…
Good
Checking timeconditions…
Good
Checking tts…
Good
Checking ttsengines…
Good
Checking ucp…
Good
Checking ucpnode…
Good
Checking userman…
Good
Checking vmblast…
Good
Checking voicemail…
Good
Checking weakpasswords…
Good
Checking webrtc…
Good
Checking xmpp…
Good
Done
Updating Hooks…Done

This is a FreePBX distro install running version 13:

PBX Firmware: 10.13.66-16
PBX Service Pack: 1.0.0.0

Any help would be appreciated.

Many thanks,
Fraser

I’ve tried removing module pm2 from the harddrive then trying to download a fresh copy but I still keep getting the same error message.

Hi,

I’m still stuck with this error and as a result I cannot update my PBX - Does anyone have any ideas or pointers on how I can get more information which may help with getting a resolution?

Thanks,
Fraser.

PBX Firmware: 10.13.66-16

This is a couple versions behind, I wonder if you need a nodejs update?

You could try:

yum upgrade nodejs

Then try updating pm2/xmpp again. Ideally you should bring your distro version up to date (10.13.66-22 is current)

[root@localhost ~]# yum upgrade nodejs
Loaded plugins: fastestmirror, kmod
Setting up Upgrade Process
Determining fastest mirrors
base | 2.0 kB 00:00
dell-system-update_dependent | 2.3 kB 00:00
dell-system-update_dependent/primary_db | 37 kB 00:00
dell-system-update_independent | 2.3 kB 00:00
dell-system-update_independent/primary_db | 110 kB 00:00
extras | 1.3 kB 00:00
pbx | 2.9 kB 00:00
schmooze-commercial | 2.9 kB 00:00
updates | 1.3 kB 00:00
No Packages marked for Update

:frowning: Any other ideas?

Upgrade using the distro upgrade scripts:
https://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66

Thanks Lorne - Will give this a try once I can schedule some down time.

Fraser.

Did you ever resolve this? I"m running into the same issue

I actually can’t remember, maybe the upgrade scripts although I’d make sure you have a good backup in case the update get stuck.

We did replace the server not so long ago so can’t check if we still have a pm2 error or not.

Good luck!

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