0

I'm running a Django development server (django-admin.py runserver 0.0.0.0:9000) on Vagrant (1.6.0, VirtualBox 4.3.1) and accessing it through my local machine (http://0.0.0.0:9000). Everything works fine at first, but after about an hour I simply lose connection. If I try ping 0.0.0.0:9000 I get unknown host 0.0.0.0:9000, both from my local machine and the vagrant shell. Restarting the server or even halting vagrant and running it again won't work. Restarting my computer does solve the problem though, but only to lose connection again after about an hour.

Does anybody have any idea of what could be happening???

Thanks

UPDATE

# Vagrantfile
...
config.vm.network :forwarded_port, guest: 9000, host: 9000, auto_correct: true
config.vm.network :forwarded_port, guest: 8983, host: 8983, auto_correct: true
Ariel
  • 3,383
  • 4
  • 43
  • 58

1 Answers1

0

Try binding to all available network interfaces like this:

python manage.py runserver [::]:9000

One of your network connections may be timing out - but that's just a guess. What OS are you running on your machine and the guest VM?

FlipperPA
  • 13,607
  • 4
  • 39
  • 71