I have a following configuration in app.conf, I have the www-data user, and the app is in ~/app directory. The directory of node is fine and the cluster is also fine. I have also tried it without the bin/cluster. But my upstart service is not starting? Is there any thing more to do? I am stuck. Every time I run sudo service app start
it gets stuck in stop/waiting. Any help would be appreciated.
env APP_HOME=~/app/
env NODE_ENV=production
env RUN_AS_USER=www-data
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn
respawn limit 5 60
pre-start script
test -x /usr/local/bin/node || { stop; exit 0; }
test -x $APP_HOME/bin/cluster || { stop; exit 0; }
test -e $APP_HOME && test -e $APP_HOME/logs || { stop; exit 0; }
end script
script
chdir $APP_HOME
exec /usr/local/bin/node bin/cluster app.js -u $RUN_AS_USER -l logs/app.out -e logs/app.err >> $APP_HOME/logs/upstart.log
end script
Aucun commentaire:
Enregistrer un commentaire