django - Connection Reset when port forwarding with Vagrant -


i have vagrant/virtualbox running ubuntu 12.04 lts os. have configured vagrant forward guest port 8000 host port 8888.

[default] preparing network interfaces based on configuration... [default] forwarding ports... [default] -- 22 => 2222 (adapter 1) [default] -- 8000 => 8888 (adapter 1) [default] booting vm... [default] waiting vm boot. can take few minutes. [default] vm booted , ready use!  

when virtual machine starts up, start django dev server on port 8000.

development server running @ http://127.0.0.1:8000/ quit server control-c. 

okay great, can put in background , can curl localhost:8000 , output server

<div id="explanation">   <p>     you're seeing message because have <code>debug = true</code> in     django settings file , haven't configured urls. work!   </p> </div> 

but when try hit server host machine firefox/chrome/telnet i'm getting connection reset/connection lost/err_connection_reset etc.

first thought may iptables thing, turns out ubuntu has default allow everything. turned off firewall on host machine. how can bottom of this?

i had django listening on 127.0.0.1:8000 (default)

as explained in mitchell's answer here: vagrant's port forwarding not working should have been listening on 0.0.0.0. here quote of answer:

i wanted add additional note caused server within vm because binds 127.0.0.1, loopback. you'll want make sure server bound 0.0.0.0 interfaces can access it.

if you're using django, want start dev server this: ./manage.py runserver 0.0.0.0:8000


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -