Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a t1.micro instance with public dns looks similar to

ec2-184-72-67-202.compute-1.amazonaws.com (some numbers changed)

On this machine, I am running a 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 AWS console enter image description here

Now when I hit the following in Chrome http://ec2-184-72-67-202.compute-1.amazonaws.com:8000, I get Oops! Google Chrome could not connect to

WHat is that I am doing wrong?

Netstat

netstat -lan | grep 8000
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN 
share|improve this question
1  
Post the output of netstat -lan | grep 8000. –  EEAA Sep 22 '12 at 3:46
1  
@ErikA, I posted the output, thank you –  learner Sep 22 '12 at 4:41
add comment

2 Answers

up vote 5 down vote accepted
>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.

share|improve this answer
1  
Yes, that is it, I was missing this –  learner Sep 22 '12 at 6:00
add comment

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
share|improve this answer
    
Thanks @Mike, this was I was missing –  learner Sep 22 '12 at 6:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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