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.

Using Putty on my Vista machine, I logged into my development server (Ubuntu) and fired up the Django Test server. I left my computer for a while (physically) and returned to find the Putty connection had timed out. No biggy, I just logged back into the server.

However, when I try to run the Django test server now, it says the port is already in use. That means (I think) that the first test server instance is still running.

How do I kill this process? What does the process even look like? I did a ps aux and have a feeling that this is the offending process:

garfonzo    5719  0.3  0.0      0     0 ?        D    08:58   1:07 [python]

Since I started the server this morning at about that time and Django is python-based. However, doing a kill 5719 does nothing -- the process is not killed and I still cannot start up the test server.

Any ideas!?

EDIT -- for more details:

I also ran netstat -tulpn and the output is this:

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

Isn't that convenient, the one port I want to know the process ID of doesn't have a PID!

share|improve this question
add comment

1 Answer 1

First, netstat won't show process IDs unless you own them or netstat is running as root. try sudo netstat -tnpl

You can find out what command line launched your process using cat /proc/5719/cmdline. If this is indeed your django service, and it's ignoring the SIGTERM signal (the default signal sent by kill) try sending it the SIGKILL instead with kill -KILL 5719

share|improve this answer
add comment

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.