Re: Poll tutorial: running the command 'python manage.py runserver' produces an error

112 views
Skip to first unread message

Branko Majic

unread,
May 25, 2013, 3:46:02 PM5/25/13
to django...@googlegroups.com
On Sat, 25 May 2013 12:40:08 -0700 (PDT)
Kokas <79pa...@gmail.com> wrote:

> Hello
>
> When I run the initially created project using the command 'python
> manage.py runserver' gives me
> Error: [Errno 10013]
>
> When I run this command though 'python manage.py runserver 8001', then I
> can see the site on http://localhost:8001
>
> Can you tell me why this happens and what are those 4 digit numbers after
> localhost?
>

The default port that is used by runserver (8000) is already in use by
some other application (or you may have started the Django development
already in another terminal).

The parameter your provided (8001) is used to specify an alternate port
on which the development server should listen. You can learn some more
from:

https://docs.djangoproject.com/en/1.5/ref/django-admin/#runserver-port-or-address-port

Best regards

--
Branko Majic
Jabber: bra...@majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.
signature.asc

Rishi Mukherjee

unread,
May 25, 2013, 3:55:45 PM5/25/13
to django...@googlegroups.com
The 'python manage.py runserver' by default runs the server on port 8000. But, your 8000 port must be getting used by some other application. Thus, 8001 works, which was free. The four digits are ports and the localhost is your IP address which is equal to 127.0.0.1. You may try this link to get the same result http://127.0.0.1:8001



Thanks,
Rishi

Tim Chase

unread,
May 25, 2013, 3:59:18 PM5/25/13
to django...@googlegroups.com, 79pa...@gmail.com
On 2013-05-25 12:40, Kokas wrote:
> Hello
>
> When I run the initially created project using the command 'python
> manage.py runserver' gives me
> Error: [Errno 10013]

A from-the-hip guess is that you're running on a machine (such as
Linux/BSD/Mac) where ports <1024 are considered privileged, and can
only be opened by "root" rather than by your user.

> When I run this command though 'python manage.py runserver 8001',
> then I can see the site on http://localhost:8001
>
> Can you tell me why this happens and what are those 4 digit numbers
> after localhost?

This tells "runserver" to listen on port "8001" (instead of the
default 80 which is privileged, being <1024). So you then need to
point your browser to localhost, and use the specified port.

-tkc

PS: I might have a fence-posting error here, as I don't remember
whether 1024 is priv'ed or not, meaning that my comments might need
to be "<=1024" rather than "<1024".

Reply all
Reply to author
Forward
0 new messages