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!

link|improve this question

42% accept rate
feedback

1 Answer

Huh, am I overseeing anything or is that process running in kernel space? Very strange

link|improve this answer
Are you saying that the lack of a PID indicates it is running in kernel space? – Garfonzo Jan 24 at 21:57
Nah, but under Linux, processes in square brackets usually indicate kernel processes. The process state is D. Do you have any disk I/O issues? Can you access the directory where your project resides? – Daniel Jan 24 at 22:01
Yup, I'm in the directory now, working away with no issues that I can tell. – Garfonzo Jan 24 at 22:04
That 5719 process may not even be the correct Django process, I was making an assumption that it is. That might be something else (and likely a kernel process). – Garfonzo Jan 24 at 22:05
Well, processes in D state most likely can't be killed. The kernel won't let you. You could try a kill -9 PID, but I guess that won't work either. All you can do is wait until the process recovers from uninterruptible sleep, or reboot the machine. – Daniel Jan 24 at 22:09
show 4 more comments
feedback

Your Answer

 
or
required, but never shown

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