Could not update pm2, now can't install

Running FreePBX

A week or so ago, an update to the pm2 module failed or did not work. I have tried to reinstall using all the other topics on the forum as a guide, but am still stuck. The error is a network timeout when trying to download, however the IP that is timing out is, port 6767 and the IP of the URL above is Additionally, I can wget the above URL on the freepbx server no problem. I have no idea where that other IP is coming from - a load balancer or something? Any advice would be greatly appreciated. Here’s the verbose install log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 63f8f99582cd8b46
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall [email protected]
7 info lifecycle [email protected]~preinstall: [email protected]
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 6ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
16 silly install loadAllDepsIntoIdealTree
17 silly fetchPackageMetaData error for [email protected]:// request to failed, reason: connect ETIMEDOUT
18 timing stage:rollbackFailedOptional Completed in 1ms
19 timing stage:runTopLevelLifecycles Completed in 452078ms
20 silly saveTree [email protected]
21 verbose type system
22 verbose stack FetchError: request to failed, reason: connect ETIMEDOUT
22 verbose stack     at ClientRequest.req.on.err (/usr/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
22 verbose stack     at emitOne (events.js:116:13)
22 verbose stack     at ClientRequest.emit (events.js:211:7)
22 verbose stack     at Socket.socketErrorListener (_http_client.js:387:9)
22 verbose stack     at emitOne (events.js:116:13)
22 verbose stack     at Socket.emit (events.js:211:7)
22 verbose stack     at emitErrorNT (internal/streams/destroy.js:64:8)
22 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:138:11)
22 verbose stack     at process._tickCallback (internal/process/next_tick.js:180:9)
23 verbose cwd /var/www/html/admin/modules/pm2/node
24 verbose Linux 3.10.0-957.21.3.el7.x86_64
25 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
26 verbose node v8.11.3
27 verbose npm  v6.14.7
28 error code ETIMEDOUT
29 error errno ETIMEDOUT
30 error network request to failed, reason: connect ETIMEDOUT
31 error network This is a problem related to network connectivity.
31 error network In most cases you are behind a proxy or have bad network settings.
31 error network
31 error network If you are behind a proxy, please make sure that the
31 error network 'proxy' config is set properly.  See: 'npm help config'
32 verbose exit [ 1, true ]

Long story short, FreePBX modules depend on a package manager called npm in some modules such as pm2. The issue you are seeing looks to be an issue with npm, however, this is the first time I’ve seen this particular issue.

For what it’s worth is another freepbx mirror server,, but unsure why it was reaching out to it. I’m also not sure why it reaches out to 6767.

I did notice that your version of node was rather old, in comparison to what I have on my system, so maybe try to run system updates to see if that fixes the issue?

You can update the system by running the following command:
yum upgrade

Okay, yum update did not find any newer versions but i upgraded npm and node manually to the latest and I’m still seeing the same thing. I don’t know enough about how npm works but it seems to me somewhere it must be mapping that package name to… Again, where is a mystery to me as I’m not an npm or nodejs guy.

This all started around 7/21/2020 with the round of yum and module updates that were performed that day. I’ve never had it be anything but smooth. Just can’t figure this one out.


In Settings -> Advanced Settings there is section for the Process Management module. In it, I found the value of NPM Proxy Server Address is I disabled the setting Use Proxy Server for NPM and re-ran fwconsole ma install pm2 and that worked! Here’s a screenshot of that section:

I’m curious what other people have set in NPM Proxy Server Address since this value I have doesn’t seem to work.

I don’t think these values are default. In fact, these settings were hidden and I had to enable readonly settings to find them. I am curious how they got set in your environment, as it seems like a non-standard setup.

Beats me! I had shown read-only settings out of curiosity, but I’ve learned with FreePBX to not change stuff unless need be. I’d be worried if it was some random place, but at least it is pointing at a Sangoma IP. What is that field supposed to have in it?

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