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.

I am using upstart 1.8-0ubuntu1 on Ubuntu-1210-quantal-64-minimal.

It shows me nginx to be running, when it's not.

# service nginx status
nginx start/running, process 2543
# ps -p 2543
PID TTY          TIME CMD

My config:

# nginx

description "nginx http daemon"
author "George Shammas <georgyo@gmail.com>"

start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]

env DAEMON=/opt/nginx/sbin/nginx
env PID=/opt/nginx/logs/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
share|improve this question
    
probably somehow .pid file is somewhere didn't get deleted. –  Danila Ladner Sep 27 '13 at 15:38
    
right so check if /opt/nginx/logs/nginx.pid exists and then compare it with "ps -waux | grep -i ngnix" –  Danila Ladner Sep 27 '13 at 15:46
add comment

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.