Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

guys! I'm kind of lost here and really need help. Problem: nginx start up and works as expected if started from terminal directly, but from UPSTART it does not start (nginx is @ /usr/local/sbin/nginx.

I'm using this conf for upstart:

# nginx

description "nginx http daemon"
author "Philipp Klose <me@'thisdomain'.de>"

start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [!2345]

env DAEMON=/usr/local/sbin/nginx
env PID=/var/tmp/nginx.pid

expect fork
respawn
respawn limit 10 5
#oom never

pre-start script
 #$DAEMON -t
 #if [ $? -ne 0 ]
 #then exit $?
 #fi
end script

exec $DAEMON

OS is Ubuntu 10.04 x64.

/var/log/daemon.log outputs this:

Feb 21 02:11:23 s4004 init: nginx main process (618) terminated with status 127
Feb 21 02:11:23 s4004 init: nginx main process ended, respawning

PATHS are OK, because if started from terminal with full path nginx works as expected. What could be the problem here?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.