ps -ef | grep asterisk
asterisk 1507 1 0 2021 ? 01:09:00 PM2 v4.5.0: God Daemon (/home/asterisk/.pm2)
root 2360 13910 0 16:21 pts/1 00:00:00 grep asterisk
asterisk 5017 1449 0 00:00 ? 00:00:02 /usr/sbin/apache2 -k start
asterisk 5018 1449 0 00:00 ? 00:00:07 /usr/sbin/apache2 -k start
asterisk 5019 1449 0 00:00 ? 00:00:01 /usr/sbin/apache2 -k start
asterisk 5020 1449 0 00:00 ? 00:00:11 /usr/sbin/apache2 -k start
asterisk 5021 1449 0 00:00 ? 00:00:02 /usr/sbin/apache2 -k start
asterisk 8328 1507 0 2021 ? 07:53:42 node /var/www/html/admin/modules/core/node/fastagi-server.js
asterisk 12555 5018 0 14:11 ? 00:00:00 [sh]
root 15469 1 0 14:45 pts/1 00:00:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 15471 15469 1 14:45 pts/1 00:01:12 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
asterisk 23478 1449 0 12:00 ? 00:01:47 /usr/sbin/apache2 -k start
asterisk 23484 1449 0 12:00 ? 00:00:01 /usr/sbin/apache2 -k start
asterisk 23485 1449 0 12:00 ? 00:00:01 /usr/sbin/apache2 -k start
asterisk 23486 1449 0 12:00 ? 00:00:01 /usr/sbin/apache2 -k start
asterisk 23487 1449 0 12:00 ? 00:00:01 /usr/sbin/apache2 -k start
asterisk 28861 1 0 Jan13 ? 00:00:21 dirmngr --daemon --homedir /home/asterisk/.gnupg
npm ERR! Linux 5.10.63-v7l+
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “–only=production”
npm ERR! node v12.22.5
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/admin/modules/pm2/node/npm-debug.log
fwconsole ma list
No repos specified, using: [standard,extended] from last GUI settings
±-----------------±-----------±------------------------------------±--------+
| Module | Version | Status | License |
±-----------------±-----------±------------------------------------±--------+
| announcement | 15.0.3.13 | Enabled | GPLv3+ |
| arimanager | 15.0.3.13 | Enabled | GPLv3+ |
| asteriskinfo | 15.0.14 | Enabled | GPLv3+ |
| backup | 15.0.10.68 | Enabled | GPLv3+ |
| blacklist | 15.0.2.17 | Enabled | GPLv3+ |
| builtin | | Enabled | |
| calendar | 15.0.4.21 | Enabled | GPLv3+ |
| callrecording | 15.0.7.24 | Enabled | AGPLv3+ |
| cdr | 15.0.17.15 | Enabled | GPLv3+ |
| cel | 15.0.15.15 | Enabled | GPLv3+ |
| conferences | 15.0.7.11 | Enabled | GPLv3+ |
| contactmanager | 15.0.8.52 | Enabled | GPLv3+ |
| core | 15.0.12.98 | Enabled | GPLv3+ |
| customappsreg | 15.0.14 | Enabled | GPLv3+ |
| dashboard | 15.0.12 | Enabled | AGPLv3+ |
| featurecodeadmin | 13.0.6.11 | Enabled | GPLv3+ |
| filestore | 15.0.3.27 | Enabled | AGPLv3 |
| framework | 15.0.21 | Enabled | GPLv2+ |
| iaxsettings | 15.0.8 | Enabled | AGPLv3 |
| infoservices | 15.0.3 | Enabled | GPLv2+ |
| ivr | 15.0.29 | Enabled | GPLv3+ |
| logfiles | 15.0.15 | Enabled | GPLv3+ |
| manager | 15.0.15 | Enabled | GPLv2+ |
| music | 15.0.22 | Enabled | GPLv3+ |
| phonebook | 15.0.12 | Disabled | GPLv3+ |
| pm2 | 15.0.7 | Disabled; Pending upgrade to 15.0.8 | AGPLv3+ |
| queues | 15.0.34 | Enabled | GPLv2+ |
| recordings | 15.0.3.16 | Enabled | GPLv3+ |
| ringgroups | 15.0.11.15 | Enabled | GPLv3+ |
| sipsettings | 15.0.6.39 | Enabled | AGPLv3+ |
| soundlang | 15.0.5.10 | Enabled | GPLv3+ |
| timeconditions | 15.0.15.11 | Enabled | GPLv3+ |
| userman | 15.0.68 | Enabled | AGPLv3+ |
| voicemail | 15.0.18.49 | Enabled | GPLv3+ |
±-----------------±-----------±------------------------------------±--------+
Hi
Try to do that:
# fwconsole ma downloadinstall pm2
or
# fwconsole ma downloadinstall pm2 --edge
“for any modules on the EDGE repos (non stable)”
Salut.
Essayes de forcer le téléchargement puis l’installation de PM2.
En fait, le module est téléchargé mais n’est pas activé, car il y a une version téléchargé en attente de mise à jour…
Hi !
Already tested, but no luck.
I also tried to uninstall then reinstall but it wont !
I also tested few other ways like
or
https://help.heroku.com/ZV7S7D6T/why-is-my-node-build-is-suddenly-displaying-npm-err-cb-apply-is-not-a-function
with no more luck.
Finally, I did a full restoration from IMG file (4 days old) and restored settings from FTP backup (1 day old) via module save/restore.
During restoration, I saw in log files the same error message concerning pm2 but it works and there is no error till now.
Auto-update tell me now there are new updates available including pm2 but I’m afraid of a new disaster.
I also can say that backup/restore module seem to have some missing backups because after restoring some settings were wrong (PJSIP module) concerning codecs.
I will look at an external SSD (already bought) to install my system and forget SD cards.
That I know, your systems must be up to date for both before to backup and restore something.
About PM2, check if there is something weird about the dependencies which can break any update / install for PM2.
Check the NodeJS version
It should be : v8.16.0
How do you check the version ?
Concerning backup/restore, if I can compare to pfsense, it is better on pfsense because it do not take care of version - You can restore any backuped version on any running version, even with a huge difference in version, it always work !
node -v
node -v
v12.22.5
Try to downgrade the version please and check again.
Ho ! Downgrade ?
Why does I got a too recent version ? Where it comes from ?
I only do updates from Freepbx and raspbx-update command line…
How do i downgrade ?
You’ll have to ask that on the RasPBX forums
Hum… Seem that this forum is not so active…
I never got any issue with RasPBX till now with the pm2 update… Very strange !
Reading this, It seems that node version is not clear depending on the OS version, Freepbx version…
Some got v8, other v10, other v11, other v12… No really clear !
I got this version on my FreePBX 15 system, and I just show you what the version is used here.
As this version works fine on my system, then try to install this version.
I remember one day updating nodeJS for tests, that broken something on my systems.
The fact to get back to the original version fixed this issue.
Little adjustments for How to Install FreePBX 15 on Debian 10 with Asterisk 16,
FYI, FreePBX 15 is not compatible with PHP7.x,
If you decide to use PHP 7.4, then install FreePBX 16.
@Franck.
So you suggest I can try to put the old “defective” Sdcard with the pm2 issue and try to downgrade node js, then try to install again pm2 ?
Right ?
npm install -g n
npm ERR! Linux 5.10.63-v7l+
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “-g” “n”
npm ERR! node v12.22.5
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
In fact, here are the results of my tries
I put back into my Raspberry the “corrupted SDcard” with pm2 errors. Lucky the system could start and I could get ssh on it/FreepbxGUI login.
In ssh console:
apt-get install npm
In cli:
fwconsole ma downloadinstall pm2
Checking modules states:
fwconsole ma list
No repos specified, using: [standard,extended] from last GUI settings
+------------------+------------+----------+---------+
| Module | Version | Status | License |
+------------------+------------+----------+---------+
| announcement | 15.0.3.13 | Enabled | GPLv3+ |
| arimanager | 15.0.3.13 | Enabled | GPLv3+ |
| asteriskinfo | 15.0.14 | Enabled | GPLv3+ |
| backup | 15.0.10.68 | Enabled | GPLv3+ |
| blacklist | 15.0.2.17 | Enabled | GPLv3+ |
| builtin | | Enabled | |
| calendar | 15.0.4.21 | Enabled | GPLv3+ |
| callrecording | 15.0.7.24 | Enabled | AGPLv3+ |
| cdr | 15.0.17.15 | Enabled | GPLv3+ |
| cel | 15.0.15.15 | Enabled | GPLv3+ |
| conferences | 15.0.7.11 | Enabled | GPLv3+ |
| contactmanager | 15.0.8.52 | Enabled | GPLv3+ |
| core | 15.0.12.98 | Enabled | GPLv3+ |
| customappsreg | 15.0.14 | Enabled | GPLv3+ |
| dashboard | 15.0.12 | Enabled | AGPLv3+ |
| featurecodeadmin | 13.0.6.11 | Enabled | GPLv3+ |
| filestore | 15.0.3.27 | Enabled | AGPLv3 |
| framework | 15.0.21 | Enabled | GPLv2+ |
| iaxsettings | 15.0.8 | Enabled | AGPLv3 |
| infoservices | 15.0.3 | Enabled | GPLv2+ |
| ivr | 15.0.29 | Enabled | GPLv3+ |
| logfiles | 15.0.15 | Enabled | GPLv3+ |
| manager | 15.0.15 | Enabled | GPLv2+ |
| music | 15.0.22 | Enabled | GPLv3+ |
| phonebook | 15.0.12 | Disabled | GPLv3+ |
| pm2 | 15.0.8 | Enabled | AGPLv3+ |
| queues | 15.0.34 | Enabled | GPLv2+ |
| recordings | 15.0.3.16 | Enabled | GPLv3+ |
| ringgroups | 15.0.11.15 | Enabled | GPLv3+ |
| sipsettings | 15.0.6.39 | Enabled | AGPLv3+ |
| soundlang | 15.0.5.10 | Enabled | GPLv3+ |
| timeconditions | 15.0.15.11 | Enabled | GPLv3+ |
| userman | 15.0.68 | Enabled | AGPLv3+ |
| voicemail | 15.0.18.49 | Enabled | GPLv3+ |
+------------------+------------+----------+---------+
Checking node version:
node -v
v12.22.5
In FreepbxGUI, everything is good.
All is now working as previously !
Many many thanks to all of you helped me in the disaster recovery !
I greatly appreciated the time you spent.