"永远列表"说"没有永远的进程运行",但它正在运行一个应用程序

Ins*_*dJW 12 ubuntu module node.js

我已经开始使用应用程序了

forever start app.js
Run Code Online (Sandbox Code Playgroud)

之后我输入了,

forever list
Run Code Online (Sandbox Code Playgroud)

它表明了这一点

The "sys" module is now called "util". It should have a similar interface.
info:   No forever processes running
Run Code Online (Sandbox Code Playgroud)

但我检查了我的流程

ps aux | grep node
Run Code Online (Sandbox Code Playgroud)

它表明了这一点

root      1184  0.1  1.5 642916  9672 ?        Ss   05:37   0:00 node     
/usr/local/bin/forever start app.js
root      1185  0.1  2.1 641408 13200 ?        Sl   05:37   0:00 node 
/var/www/app.js
ubuntu    1217  0.0  0.1   7928  1060 pts/0    S+   05:41   0:00 grep --color=auto node
Run Code Online (Sandbox Code Playgroud)

我无法控制该过程,因为我无法在"永远列表"中列出该过程

我怎样才能让"永远"了解其运行过程并控制其运行过程.

Kun*_*dia 8

forever list应该使用与进程相同的用户调用.通常它是root用户(除非指定了ubuntu upstart),所以你可以切换到root用户sudo su,然后尝试forever list.

PS.最近搬到了pm2,它具有比永远更多的功能.


小智 1

我今天也遇到了同样的问题。

就我而言:我正在使用 NVM 并忘记它不会设置/修改全局节点路径,所以我必须手动设置它

export NODE_PATH="/root/.nvm/v0.6.0/bin/node"
Run Code Online (Sandbox Code Playgroud)