-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Error ERR_INSPECTOR_NOT_AVAILABLE when I start application with pm2 #4141
Description
What's going wrong?
Running our application manually, npm run prod, works. But once I'm trying to start with pm2, pm2 start --name sequoia_galam -i 1 npm -- run prod, it issues a trace:
Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available
at inspector.js:14:9
at NativeModule.compile (internal/bootstrap/loaders.js:341:5)
at Function.NativeModule.require (internal/bootstrap/loaders.js:213:16)
at Function.Module._load (internal/modules/cjs/loader.js:539:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/home/pm2/node_modules/pm2/node_modules/@pm2/io/build/main/src/services/inspector.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
inspector.js:14
throw new ERR_INSPECTOR_NOT_AVAILABLE();
This traces comes from nodejs, that made me wonder if this problem depends on node version. And yes, I've manage to reproduce this problem with 11.7.0 and 10.15.0 versions of nodejs. But it works ok with 8.15.0.
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Sun Jan 27 2019 23:16:59 GMT+0300 (MSK)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 3.2.9
node version : 11.7.0
node path : not found
argv : /usr/bin/node,/home/pm2/node_modules/pm2/lib/Daemon.js
argv0 : node
user : wwwnode
uid : 1002
gid : 1002
uptime : 66min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 3.2.9
node version : 10.15.0
node path : /home/pm2/node_modules/pm2/bin/pm2
argv : /usr/bin/node,/home/pm2/node_modules/pm2/bin/pm2,report
argv0 : node
user : wwwnode
uid : 1002
gid : 1002
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
cpus nb : 24
freemem : 6377500672
totalmem : 135048151040
home : /home/wwwnode
===============================================================================
--- PM2 list -----------------------------------------------
┌───────────────┬────┬─────────┬──────┬─────┬─────────┬─────────┬────────┬─────┬────────┬─────────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
├───────────────┼────┼─────────┼──────┼─────┼─────────┼─────────┼────────┼─────┼────────┼─────────┼──────────┤
│ sequoia_galam │ 1 │ N/A │ fork │ 0 │ errored │ 15 │ 0 │ 0% │ 0 B │ wwwnode │ disabled │
│ sequoia_galam │ 2 │ N/A │ fork │ 0 │ errored │ 15 │ 0 │ 0% │ 0 B │ wwwnode │ disabled │
│ sequoia_galam │ 3 │ N/A │ fork │ 0 │ errored │ 15 │ 0 │ 0% │ 0 B │ wwwnode │ disabled │
│ sequoia_galam │ 4 │ N/A │ fork │ 0 │ errored │ 15 │ 0 │ 0% │ 0 B │ wwwnode │ disabled │
└───────────────┴────┴─────────┴──────┴─────┴─────────┴─────────┴────────┴─────┴────────┴─────────┴──────────┘
Module
┌───────────────┬────┬─────────┬─────┬─────────┬─────────┬─────┬────────┬─────────┐
│ Module │ id │ version │ pid │ status │ restart │ cpu │ memory │ user │
├───────────────┼────┼─────────┼─────┼─────────┼─────────┼─────┼────────┼─────────┤
│ pm2-logrotate │ 0 │ 2.6.0 │ 0 │ errored │ 15 │ 0% │ 0 B │ wwwnode │
└───────────────┴────┴─────────┴─────┴─────────┴─────────┴─────┴────────┴─────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/wwwnode/.pm2/pm2.log last 20 lines:
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] starting in -fork mode-
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] online
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] starting in -fork mode-
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] online
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] starting in -fork mode-
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] online
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] starting in -fork mode-
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] online
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] starting in -fork mode-
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] online
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] starting in -fork mode-
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] online
PM2 | 2019-01-27T23:07:11: PM2 log: App [sequoia_galam:4] exited with code [1] via signal [SIGINT]
PM2 | 2019-01-27T23:07:11: PM2 log: Script /usr/bin/npm had too many unstable restarts (16). Stopped. "errored"