Добрый день.
Возникла проблема с upstart, не запускает мой сервак на node js. При попытке запуска выдает:
start: Unknown job: node
DEBUG: upstart_path=/sbin/init
DEBUG: initctl_path=/sbin/initctl
DEBUG: confdir=/tmp/init-checkconf.doGLTE7I3G
DEBUG: file=/etc/init/node.conf
DEBUG: job=node
DEBUG: ok - no other running instances detected
DEBUG: upstart_out=/tmp/init-checkconf-upstart-output.xGLXyIpIq4
DEBUG: upstart_cmd=/sbin/init --session --no-sessions --no-startup-event --verbose --confdir /tmp/init-checkconf.doGLTE7I3G
DEBUG: Waiting for Upstart to reply over D-Bus (attempt 1)
DEBUG: Waiting for Upstart to reply over D-Bus (attempt 2)
DEBUG: Waiting for Upstart to reply over D-Bus (attempt 3)
DEBUG: Waiting for Upstart to reply over D-Bus (attempt 4)
DEBUG: Waiting for Upstart to reply over D-Bus (attempt 5)
ERROR: failed to ask Upstart to check conf file
DEBUG: stopping secondary Upstart (running with PID 1408)
Содержимое node.conf:
#!upstart
description "node.js server"
author "rdbn"
env NODE_BIN=/usr/local/bin/node
env APP_DIR=/home/rdbn/game
env SCRIPT_FILE="app.js" # Entry point for the nodejs app
env LOG_FILE=/var/log/node.sys.log
env RUN_AS="rdbn"
#If you are not on Ubuntu, or are on a newer version than Lucid you might wish to try this.
#start on start
#else
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
script
touch $LOG_FILE
chown $RUN_AS:$RUN_AS $LOG_FILE
chdir $APP_DIR
exec sudo -u $RUN_AS sh -c " $NODE_BIN $SCRIPT_FILE >> $LOG_FILE 2>&1"
end script
pre-start script
# Date format same as (new Date()).toISOString() for consistency
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> $LOG_FILE
end script
pre-stop script
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> $LOG_FILE
end script
post-start script
echo "===== App restarted =====" >> $LOG_FILE end script
#respawn
#respawn limit 5 60