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 .

arpit joshi
  • 425
  • 2
  • 6
  • 13
  • Is the HOSTequal to the VM? If not, did you enable bridged or host-only networking in the vm guest? – gerhard d. May 02 '16 at 06:40
  • @gerhardd.its on NAT – arpit joshi May 02 '16 at 07:21
  • And what does your routing table says? Could you post the output of `ip route show`? – lgeorget May 02 '16 at 09: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 02 '16 at 09: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 02 '16 at 23:11
  • @gerhardd. VM is a gues on a host .I have a KVM on centos and the VM guest is running on top of KVM – arpit joshi May 02 '16 at 23:12
  • I'm having the same problem with an AWS server. netmask, broadcast, subnet, VPC, security and Iam groups all match, I even open my security group to accept connections from anywhere just to test and I still couldn't get this to work – chaos Aug 04 '16 at 14:41

0 Answers0