Sunday, March 15, 2009

Windows Vista deception -- "Error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions"

I just got started on Vista after years of developing on XP. When I tried Django's
manage.py runserver
which defaults to localhost:8000, I got this error: 
Django version 1.1 alpha 1 SVN-10020, using settings 'mashup.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions

It turns out Aptana Studio is also using port 8000 for it internal server, so Vista instead of reporting that port 8000 is already binded to, rambles about access permissions. I had been doing the same thing in Windows XP, but apparently XP lets you run two servers on the same port without complaining (crazy!)

Solution:

manage.py runserver localhost:8001

Matt