3

I have a t1.micro instance with the public DNS that looks similar to the following:

ec2-184-72-67-202.compute-1.amazonaws.com

(some numbers have been changed)

On this instance, I am running the following Django app:

$ sudo python manage.py runserver --settings=vlists.settings.dev
Validating models...

0 errors found
Django version 1.4.1, using settings 'vlists.settings.dev'
Development server is running at http://127.0.0.1:8000/

I have opened the port 8000 through the AWS console

Screenshot:

When I navigate to the the following URL in Chrome, I get the message: Oops! Google Chrome could not connect to:

http://ec2-184-72-67-202.compute-1.amazonaws.com:8000

What am I doing wrong?

Netstat:

netstat -lan | grep 8000
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN 
1
  • 1
    Post the output of netstat -lan | grep 8000.
    – EEAA
    Sep 22, 2012 at 3:46

2 Answers 2

5
>Development server is running at http://127.0.0.1:8000/

Sounds like the server is set to respond only on the localhost.
Check your Django config, and make sure it's set to respond on all interfaces.

Update:

netstat -lan | grep 8000
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN 

Yep, definitely an issue with your bindings. 127.0.0.1 should instead be your Public IP or 0.0.0.0 for all interfaces.

1
  • 1
    Yes, that is it, I was missing this
    – learner
    Sep 22, 2012 at 6:00
3

You need to bind the runserver to all ports.. by default it just binds to localhost

 python manage.py runserver --settings=vlists.settings.dev 0.0.0.0:8000
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .