Linux: find thin server running on port 80 and kill it

Posted by Andrew on Server Fault See other posts from Server Fault or by Andrew
Published on 2012-12-15T01:23:15Z Indexed on 2012/12/15 5:08 UTC
Read the original article Hit count: 435

Filed under:
|
|

On my Linux server I ran:

sudo thin start -p 80 -d

Now I'd like to restart the sever. The trouble is, I can't seem to get the old process to kill it. I tried:

netstat -anp

But what I see on port 80 is this:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -         

So, it didn't give me a PID to kill...

I tried pgrep -l thin but that gave me nothing. Meanwhile pgrep -l ruby gives me like 6 processes running. I don't really understand why multiple ruby threads would be running, or which one I need to kill...

How do I kill / restart the thin daemon?

© Server Fault or respective owner

Related posts about ruby

Related posts about ubuntu-12.04