Skip to content
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 kill' or 'pm2 -v' actually start and then stop the pm2 in CLI #2871

Closed
betimer opened this issue May 10, 2017 · 4 comments
Closed

'pm2 kill' or 'pm2 -v' actually start and then stop the pm2 in CLI #2871

betimer opened this issue May 10, 2017 · 4 comments

Comments

@betimer
Copy link

betimer commented May 10, 2017

What's going wrong?
pm2 should not start in pm2 kill or pm2 -v
How could we reproduce this issue?
pm2 kill
or pm2 -v before pm2 started

Supporting information

PM2 version: 2.4.6
Node version: 7.10.0
Windows

Logs in console:
C:\Users\Xin>pm2 kill
[PM2] Spawning PM2 daemon with pm2_home=C:\Users\Xin.pm2
[Keymetrics.io] [Agent updated] Agent ACTIVE - Web Access: https://app.keymetrics.io/
[PM2] PM2 Successfully daemonized
[PM2] Stopping PM2...
[PM2][WARN] No process found
[PM2] All processes have been stopped and deleted
[PM2] PM2 stopped

@betimer betimer changed the title pm2 kill or pm2 -v` actually start and then stop the pm2 in CLI 'pm2 kill' or 'pm2 -v' actually start and then stop the pm2 in CLI May 10, 2017
@poppinlp
Copy link
Contributor

poppinlp commented May 11, 2017

In the pm2 bin file, seems like if there's no no-daemon, startup and unstartup option, the client will always try to connect to daemon by sock and then do command job. So this issue occurs.

Maybe could split all command into 2 parts which one part needs connecting to daemon and the other dosen't ?

If that's the way to resolve this issue i could send a PR.

@vmarchaud
Copy link
Contributor

@poppinlp Maybe make a array of command that doesn't need the daemon to be launched and then check if the first argument is in this list ? Of course you can make a PR, we will be happy to merge it :)

@Unitech
Copy link
Owner

Unitech commented Dec 12, 2017

pending release

@Unitech
Copy link
Owner

Unitech commented Dec 14, 2017

Fixed.

Changelog: 2.9.0 CHANGELOG
Introduced in version: 2.9.0

Update procedure:

npm install pm2 -g
pm2 update

@Unitech Unitech closed this as completed Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants