Upstart error completed status 1

I have an ubuntu 10.04 server and tried to create an upstart script:

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 

This should start with a node script that works if I run it manually on the command line. But when I try to "start node -workerListener", I get the message "node -workerListener start / running, process 1323", but it is not.

In / var / log / syslog: "... init: node -workerListener main process (1317), terminated by status 1"

What can I do?

+4
source share
1 answer

You can also use forever https://github.com/nodejitsu/forever to start the node process.

Here is a detailed description: http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever

-2
source

Source: https://habr.com/ru/post/1439897/


All Articles