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

Stop and Stop All glitchs #50

Closed
snkashis opened this issue May 4, 2011 · 3 comments
Closed

Stop and Stop All glitchs #50

snkashis opened this issue May 4, 2011 · 3 comments

Comments

@snkashis
Copy link

snkashis commented May 4, 2011

Hello,

I usually use Forever to launch one node script as a backend web service, and I notice something weird with the newer version.
After i call forever stop 0, It seems to tell me it stopped my service, yet if I now type forever list, it is still there.However, If i try to stop 0 again, it isn't available to stop. and Stop all ends with a error. Here's the console below.

Thanks again for this great tool, and hope I can help you debug this.

ubuntu@ip-:~/code$ forever stop 0
info: Running action: stop
info: Forever stopped process:
  [0] overlay.js [4063, 4062] /home/ubuntu/.forever/G-nZ.log 0:0:4:53.542
ubuntu@ip-0:~/code$ forever list
info: Running action: list
info: Forever processes running
  [0] overlay.js [4063, 4062] /home/ubuntu/.forever/G-nZ.log 0:0:4:55.576
ubuntu@ip-:~/code$ forever stop 0
info: Running action: stop
error: Forever cannot find process with index: 0
ubuntu@ip-:~/code$ forever stop all
info: Running action: stop
info: Forever processing file: all

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
TypeError: Cannot call method 'filter' of null
    at Object.findByScript (/home/ubuntu/.nvm/v0.4.7/lib/node/.npm/forever/0.5.1/package/lib/forever.js:286:20)
    at Object.stop (/home/ubuntu/.nvm/v0.4.7/lib/node/.npm/forever/0.5.1/package/lib/forever.js:188:46)
    at Object.stop (/home/ubuntu/.nvm/v0.4.7/lib/node/.npm/forever/0.5.1/package/lib/forever/cli.js:95:24)
    at EventEmitter. (/home/ubuntu/.nvm/v0.4.7/lib/node/.npm/forever/0.5.1/package/lib/forever/cli.js:68:15)
    at EventEmitter.emit (events.js:61:17)
    at Array. (/home/ubuntu/.nvm/v0.4.7/lib/node/.npm/forever/0.5.1/package/lib/forever.js:396:15)
    at EventEmitter._tickCallback (node.js:126:26)
ubuntu@ip:~/code$ 

@indexzero
Copy link
Member

Thanks @snkashis. I will investigate this tonight. Try to have a fix out tomorrow.

@indexzero
Copy link
Member

This is indeed a bug, but you are also using forever incorrectly. Run forever stopall not forever stop all; the space is significant. Forever is trying to stop a process with the name all, when it can't find one, it isn't gracefully exiting

@snkashis
Copy link
Author

snkashis commented May 4, 2011

Sorry for my incorrect usage of stopall! In regards to the real bug, I feel this has arrived in a recent version, since I have been using Forever since mid February for my position at work, and try to stay up to date constantly with the latest releases.

Thanks for your quick response! Was just looking through the code myself to see if I could help.
-Steve

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants