forever: error: Forever cannot find process with id

My app is currently running, let’s say its name is name.js.

If I run forever list, it shows name.js related entry.

But if I run forever stop name.js it throws

error:   Forever cannot find process with id: name.js

If I look at ps aux output, it shows one entry for the currently running name.js app, and one entry for the monitor process.

Versions: node: 0.10.33 npm: 1.4.28 forever: 0.13.0

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

If you have a directory like /User/bitliner/Node/app, and the entry is name.js, forever stop only works in following manners: Start it like these:

$ cd /User/bitliner/Node/app
$ forever start name.js

or

$ cd /User/bitliner/Node
$ forever start app/name.js

or

$ cd ~/
$ forever start --sourceDir /User/bitliner/Node/app name.js

If you wanna stop it, try to pass a relative or absolute path, like:

$ cd /User/bitliner/Node/app
$ forever stop name.js

or

$ cd /User/bitliner/Node/app
$ forever stop ./name.js

or

$ cd /User/bitliner/Node
$ forever stop app/name.js

or

$ cd ~/
$ forever stop /User/bitliner/Node/app/name.js

+1 This is a real problem . version 0.15.3

screen shot 2018-08-02 at 10 13 57 pm

BTW, usage:

forever stop <PID | UID | INDEX | SCRIPT>

We recommend using pid, uid, index. e.g.: if pid is 24789

forever stop 24789

and if index is [0]

forever stop 0

and if uid is uX0l

forever stop uX0l