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 unable to stop nginx server by the command sudo /etc/init.d/nginx stop

tried killing it through pid

First I check the process which is listening to a port via this command.

lsof -Pnl +M -i4

Then I kill it by

sudo kill -9 pid

The app is still running!!. After that when i again do

lsof -Pnl +M -i4

I see that a new process is now listening on the same port, for which i tried to kill the process.

Regards, Pankaj

share|improve this question

3 Answers 3

Did you try stopping the process as root?

share|improve this answer

check that path to pid in initscript and path to pid in nginx.conf are identical

share|improve this answer
    
in nginx.conf the line for path to pid is commented. In initscript what I understand by this is the file /etc/init.d/nginx has the following contents pastie.org/1508070 –  user68613 Jan 29 '11 at 5:43

Are you sure the process is not a zombie? When it is a zombie, in most cases only a reboot will help.

You can read more about zombies here.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.