New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pm2-logrotate is not running, showing errored status all the time #155
Comments
same problem's here.
Line 10 in 1e6904a
I'll be glad if there's a branch for legacy versions of node. |
@anvesh14 as a workaround, I forked pm2-logrotate and made pm2-logrotate-legacy-nodejs. |
@rapidia , Thanks for the suggestion. I followed different approach which resolved my issue Actually i cloned the code of pm2-logrotate and updated the pm2-logrotate/package.json file with below |
@anvesh14 👍 It's same approach with |
This worked great! Many thanks!! |
What's going wrong?
I am trying to install pm2-logrotate@2.7.0 on pm2@3.5.2 (node.js@3.5.2), i am unable to run the pm2-logrotate and facing issues.
pm2 log info
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:511:25)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at Module.Hook._require.Module.require (/app/node/.nvm/versions/node/v6.1.0/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:80:39)
at require (internal/module.js:20:19)
at Object. (/app/node/.pm2/modules/pm2-logrotate/node_modules/pm2/lib/API.js:15:21)
/app/node/.pm2/modules/pm2-logrotate/node_modules/chalk/source/index.js:103
...styles,
^^^
PM2 log: App [pm2-logrotate:0] online
PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 log: App [pm2-logrotate:0] online
PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 log: App [pm2-logrotate:0] online
PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 log: App [pm2-logrotate:0] online
PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 log: App [pm2-logrotate:0] online
PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 log: Script /app/node/.pm2/modules/pm2-logrotate/node_modules/pm2-logrotate/app.js had too many unstable restarts (16). Stopped. "errored"
==================================================================
How could we reproduce this issue?
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Tue May 26 2020 09:14:07 GMT-0400 (EDT)
--- Daemon -------------------------------------------------
pm2d version : 3.5.2
node version : 6.1.0
node path : /app/node/.nvm/versions/node/v6.1.0/bin/pm2
argv : /app/node/.nvm/versions/node/v6.1.0/bin/node,/app/node/.nvm/versions/node/v6.1.0/lib/node_modules/pm2/lib/Daemon.js
argv0 : undefined
user : node
uid : 867
gid : 865
uptime : 47min
--- CLI ----------------------------------------------------
local pm2 : 3.5.2
node version : 6.1.0
node path : /app/node/.nvm/versions/node/v6.1.0/bin/pm2
argv : /app/node/.nvm/versions/node/v6.1.0/bin/node,/app/node/.nvm/versions/node/v6.1.0/bin/pm2,report
argv0 : undefined
user : node
uid : 867
gid : 865
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
cpus nb : 2
freemem : 481648640
totalmem : 3731562496
home : /app/node
--- PM2 list -----------------------------------------------
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
Module
┌───────────────┬────┬─────────┬─────┬─────────┬─────────┬─────┬────────┬──────┐
│ Module │ id │ version │ pid │ status │ restart │ cpu │ memory │ user │
├───────────────┼────┼─────────┼─────┼─────────┼─────────┼─────┼────────┼──────┤
│ pm2-logrotate │ 0 │ 2.7.0 │ 0 │ errored │ 15 │ 0% │ 0 B │ node │
└───────────────┴────┴─────────┴─────┴─────────┴─────────┴─────┴────────┴──────┘
--- Daemon logs --------------------------------------------
/app/node/.pm2/pm2.log last 20 lines:
PM2 | 2020-05-26T08:41:39: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] online
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] online
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] online
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] online
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] online
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] starting in -fork mode-
PM2 | 2020-05-26T08:41:40: PM2 log: App [pm2-logrotate:0] online
PM2 | 2020-05-26T08:41:41: PM2 log: App [pm2-logrotate:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-05-26T08:41:41: PM2 log: Script /app/node/.pm2/modules/pm2-logrotate/node_modules/pm2-logrotate/app.js had too many unstable restarts (16). Stopped. "errored"
The text was updated successfully, but these errors were encountered: