-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
15 restarts, no logs #546
Comments
Make sure that the |
It seems to be a permissions issue, though I'm trying to figure out exactly which one. The exact same deployment script works if I'm logged in as
The permissions of I ran After
Looks like pm2 doesn't quite support more than one user running commands? I've been running pm2 as |
What user has started pm2 the first time? ps -ef | grep pm2 Could you try specifying logs (out and err) and pid paths through a json file? |
That must be it - pm2 was first started by |
Maybe linked to #329 (comment) (multi-user suggestions) ? The link leads to a 404 error. |
Fixed the link, it was missing |
Ok thanks, could you try changing the user that is running pm2 to see if it works? You could also try using
It should resolve such things but this feature is not really working according to #329. |
We 'll try to fix those user-related things, closing feel free to reopen if it's not fixed. |
Now I'm getting the following error:
I started the pm2 daemon as the same user as the one that runs |
What error is this? You only gave a piece of stack trace. |
Sorry, updated the trace above. |
Did you use |
I was using |
Multi-user configuration is not fully functionnal atm, we are looking for a solution to improve this but it's not an easy task (#329 (comment)). |
I ran into the same issue and @soyuka's comment about checking the first user who started pm2 helped me. It was my personal user account and not the specific account I had created for the app ( ghost blog ) |
This one just bothered me yesterday, I was trying to restart in cluster mode with an option of "-i" to start multiple apps for the same node-worker but I was unable to do it. Then I looked into the folder logs/ created inside "$userHome/.pm2/" by giving a command "ls -al $userHome/.pm2/logs/*" I found that there were files which were owned by root and when I deleted them and then restarted the Apps, they were just turning ON as it never happened before I meant to say the ISSUE of ERRORED. Hope this helps somebody. |
In my case the problem was trivial. I looked at
The part I did not have any server/while loops inside my script - so it run from top to bottom and was exiting as soon as it run the last line of code. As expected... This was causing the 15 restarts. I had logs - so it is not exactly the same issue - but it was the first result I found when looking for a solution - so I'm leaving it here in case anyone else runs into the same issue. |
I started to have same problems with pm2 2.3.0, when trying to run cluster app with $ pm2 logs --lines 200
[TAILING] Tailing last 200 lines for [all] processes (change the value with --lines option)
/home/ubuntu/.pm2/pm2.log last 200 lines:
...
PM2 | path.js:1144
PM2 | cwd = process.cwd();
PM2 | ^
PM2 |
PM2 | Error: ENOENT: no such file or directory, uv_cwd
PM2 | at Error (native)
PM2 | at Object.resolve (path.js:1144:25)
PM2 | at Function.Module._resolveLookupPaths (module.js:361:17)
PM2 | at Function.Module._resolveFilename (module.js:431:31)
PM2 | at Function.Module._load (module.js:388:25)
PM2 | at Module.require (module.js:468:17)
PM2 | at require (internal/module.js:20:19)
PM2 | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:12:15)
PM2 | at Module._compile (module.js:541:32)
PM2 | at Object.Module._extensions..js (module.js:550:10)
PM2 | 2017-02-20 14:16:08: App name:app id:0 disconnected
PM2 | 2017-02-20 14:16:08: App [app] with id [0] and pid [28520], exited with code [1] via signal [SIGINT]
PM2 | 2017-02-20 14:16:08: Script /.../app.js had too many unstable restarts (16). Stopped. "errored"
PM2 | 2017-02-20 14:16:08: App name:app id:1 disconnected
PM2 | 2017-02-20 14:16:08: App [app] with id [1] and pid [28538], exited with code [1] via signal [SIGINT]
PM2 | 2017-02-20 14:16:08: Script /.../app.js had too many unstable restarts (16). Stopped. "errored" Running it in non-cluster mode worked. Also worked in cluster mode, but with However after I upgraded pm2 to 2.4.0 it started to work for me. |
My script is in an
errored
status and none of the log files shown bypm2 desc
contain anything (they don't exist). How can I debug what caused the 15 restarts in a row?Also,
~/pm2/logs
is empty.The text was updated successfully, but these errors were encountered: