Hi I've been trying almost everything to access my elasticsearch database from my vagrant VM. In this forum there are plenty of threads but none of them seems to work, that's why I'm posting.
The thing is that if I type: curl -X GET http://127.0.0.1:9200 outside of vagrant I'll get the content of my elastisearch localhost.
Inside of vagrant I connect to my mongodb databases through:
mongo 10.0.2.2:27017
Therefore, and following one of these answers:
Vagrant reverse port forwarding?
I expected that by changing this:
vagrant ssh -- -R 12345:localhost:80
into this:
vagrant ssh -- -R 12345:10.0.2.2:9200
I would be able to access my elasticsearch from vagrant if I typed:
curl -X GET http://10.0.2.2:9200
but I'm not getting anything...
This is the content of my vagrant file:
Vagrant.configure(2) do |config|
# config.vm.box = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.box = "xenial-amd64"
config.vm.box_url = "https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"
config.vm.hostname = "proxy"
config.vm.network "private_network", ip: "192.168.90.103"
config.vm.provision :shell, :path => "provisions/shell/bootstrap.sh"
end