I am trying to use vagrant to test an application configuration. My run-time configuration has 3 machines - one runs a reverse proxy (nginx), the second runs a python application and the third runs a database (MongoDB). My host machine runs windows 7, the guest machines run ubuntu 12.04. The particular test configuration I'm trying to get to work has MongoDB running on the host, the reverse proxy running on a virtualbox vm, and the application running on the host. What I am seeing is that from the virtualbox vm running the reverse proxy I can ping the host (ping 192.168.56.1), and I can access the mongoDB database on the host at
192.168.56.1:27017 (I have a program on the same machine as the nginx reverse proxy that does this), but I cannot access the python application running on the host at
192.168.56.1:3000 via http. Nginx cannot forward messages to that address, and if I ssh to the box, I cannot curl that address either - the connection times out. On the host, I can successfully access
127.0.0.1:3000, so I know the python app is running properly. I did not (initially) set up a private network with vagrant - vagrant seems to have established 192.168.56.1 without me asking. I discovered it using ipconfig on the host. I tried setting up a private network explicitly (192.168.33.10), and then using 192.168.33.1 to address the host, but this did not change the behavior I saw, so I removed it.
Even more confusingly, if I run the python application in a second virtualbox, instead of on the host, everything works. On the second virtual box, I have a port forward statement that forwards host port 3000 to guest port 80. Curl on the first virtualbox can successfully address
192.168.56.1:3000 via http, and Nginx on the first box successfully forwards messages to the python application on second box.
I would be very grateful for any ideas on why things work the way they do, and what I can do get get it to work the way I want. Even suggestions of how to debug better would help.