3

I have a elasticsearch service running on MY_HOST_IP(10.x.x.xx) and port 9200. I am able to ping 10.x.x.xx from my VM, but when I try to connect elasticsearch it gives me :

no route to host exception.

Even when I telnet it gives me same error. I have reloaded my iptables but didn't get expected result.

Even curl command results in the same thing

curl -XGET "http://10.x.x.xx:9200"

no route to host 

Also I am able to ssh from VM to my host machine .

  • Is the HOSTequal to the VM? If not, did you enable bridged or host-only networking in the vm guest? – gerhard d. May 2 '16 at 6:40
  • @gerhardd.its on NAT – arpit joshi May 2 '16 at 7:21
  • And what does your routing table says? Could you post the output of ip route show? – lgeorget May 2 '16 at 9:24
  • And is HOST equal to VM, or is VM a guest on HOST? You will need Bridged networking for the HOST in order to be reachable from outside. – gerhard d. May 2 '16 at 9:25
  • @Igeorget Out put is default via 192.168.122.1/24 dev eth0 proto static metric 100 . 192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.157 metric 100 – arpit joshi May 2 '16 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.