Set up ES cluster on Azure (Discovery problem)

I have spend a few hours trying to set up a 2 nodes cluster on Azure cloud, but it looks like ES on these two VMs cannot find each other.
Below are the thing I have done

  1. Set up a virtual network
  2. Create two vms in this network
  3. Set up ES on both vms
  4. Open ports 9200 and 9300 on Azure platform
  5. Open ports 9200 and 9300 on both Vms

Every time I tried localhost:9200/_cat/nodes, there is always 1 node. And also, publicIP:9200 doesn't work for me either. Can someone help me out? Thanks a lot.

Are you using the Azure cloud plugin or have you configured your unicast discovery so that the nodes can find each other?

Also, if you are using elasticsearch 2.0 and >, did you set

I have setup ES on Azure VMs (IaaS V2 VM) successfully with ES built-in unicast discovery mechanism.
As David mentioned, make sure set if you are using ES 2.x.

As for public IP:9200, you need setup Azure load balancer. in front of VMs.

Thanks for your reply. I forgot to mention that I have set , is it correct? and also, I am using Unicast : [,].

BTW, did you follow any tutorial? Since this is the first time for me to set up a cluster, I am using this one

Thanks. As you mentioned in another thread, I have set it to Is it correct? I guess it means ES is listening to both remote and local request.

Just to follow up, when I try to connect one vm from the other, it gives an error: Failed connect to; No route to host.

And also, I have the following setup: ["", ""] (default)


You need to set

Thanks to all of you. Finally, I got it work. It turns out there was some firewall issue (vm in virtual network need more configuration).