Node.js Upstart错误已终止,状态为1

Node.js Upstart错误已终止,状态为1,node.js,ubuntu-10.04,upstart,Node.js,Ubuntu 10.04,Upstart,我有一台ubuntu 10.04服务器,并尝试创建一个upstart脚本: description "node-workerListener" author "me" start on startup stop on shutdown script # We found $HOME is needed. Without it, we ran into problems export HOME="/var/www" exec sudo

我有一台ubuntu 10.04服务器,并尝试创建一个upstart脚本:

description "node-workerListener"
author      "me"

start on startup
stop on shutdown

script
        # We found $HOME is needed. Without it, we ran into problems
        export HOME="/var/www"

        exec sudo -u www-data /usr/local/bin/node /var/www/vhost/node/test/workerListener.js 2>&1 >> /var/log/node/helloworld.log
end script
如果我在命令行上手动启动节点脚本,它应该会启动一个节点脚本。但是,当我尝试“启动节点workerListener”时,我得到消息“节点workerListener启动/运行,进程1323”,但它没有

在/var/log/syslog中:“…初始化:节点workerListener主进程(1317)已终止,状态为1”


我能做什么?

您也可以使用永久运行来运行节点进程


下面是一篇详细的文章:

当您在命令行上运行“sudo-u www-data/usr/local/bin/node/var/www/vhost/node/test/workerListener.js 2>&1>/var/log/node/helloworld.log end script”时会发生问题?我也有同样的问题。你解决了吗?可能和sudo的使用有关。。。尝试“sudo start node workerListener”在internet上的某个位置找到这一行
start on started mountall
注释者
#以前是:start on startup/#,直到我们在引导时发现一些装载尚未准备就绪