Solved: Django Development Server Continues To Restart

Posted January 17th, 2012 in Django, General, Linux, Python by ryan

Hey ./manage.py runserver, Y U No Work?

Recently I was working on a Django-based project that integrates with Android and Embedded Linux devices. One day a coworker called me and asked about an error he had encountered. It seemed like he was not able to execute ./manage.py runserver to any port he had previously used. He was careful to use Control + C to stop the server, but for some reason the port was held onto by something. Looking at the output of “ps aux” was not showing any running processes using ./manage.py.

Who’s using that port?

Next instead of looking at processes, I wanted to see what was holding onto that port.  I ran the following command:

netstat -lpn | grep 8000

The output gave me the answer:

tcp    0    0 127.0.0.1:8000        0.0.0.0:*      LISTEN    15902/adb

So ADB was the culprit. A simple kill -9 to the process ID and the issue was fixed (temporarily). The issue keeps occuring, so maybe something in my code may be keeping ADB holding onto that port. I’m using the subprocess module to interact with ADB. I tried adding a call to terminate from the result of my subprocess.Popen call, but that ended very badly and had no effect on the hanging port. I’m sure when I have time to dig deeper (read “After My Looming Deadline”), I’ll try to write some tests to explore this issue more thoroughly.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Linux Use #257 – Baby Rocker

Posted August 27th, 2009 in General by ryan

I absolutely love this video of using a shell script, string, and cd-rom to gently rock a baby…nice.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

CodeWeaver Cross Over Pro ~ Free Today Only

Posted October 28th, 2008 in Blogs I Read, General, Linux by ryan

I caught this scoop from Nolan’s blog this morning…

The company that makes the commercial version of WINE that allows you to install windows apps natively on mac or linux is giving their product away for free for 24 hours.  Here’s an article explaining it at length:

And here is the site to get the serial # and product.


[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
FireStats icon Powered by FireStats