# Set up ES cluster on Azure (Discovery problem)

**URL:** <https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195>\
**Category:** Elasticsearch\
**Created:** [December 15, 2015, 5:11am UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195 "2015-12-15T05:11:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yongyao\_Jiang](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@Yongyao\_Jiang](https://discuss.elastic.co/u/Yongyao_Jiang)\
**Post date:** [December 15, 2015, 5:11am UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/1 "2015-12-15T05:11:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 15, 2015, 7:44am UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/2 "2015-12-15T07:44:49Z")

</div>

Are you using the [Azure cloud plugin](https://github.com/elastic/elasticsearch-cloud-azure) or have you configured your unicast discovery so that the nodes can find each other?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2015, 7:48am UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/3 "2015-12-15T07:48:27Z")

</div>

Also, if you are using elasticsearch 2.0 and \>, did you set `network.host`?

---

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [December 15, 2015, 9:21am UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/4 "2015-12-15T09:21:19Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Yongyao\_Jiang](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@Yongyao\_Jiang](https://discuss.elastic.co/u/Yongyao_Jiang)\
**Post date:** [December 15, 2015, 3:19pm UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/5 "2015-12-15T15:19:11Z")

</div>

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

BTW, did you follow any tutorial? Since this is the first time for me to set up a cluster, I am using this one [http://thomasardal.com/running-elasticsearch-in-a-cluster-on-azure/](http://thomasardal.com/running-elasticsearch-in-a-cluster-on-azure/)

---

<div class="post-metadata">

**Author:** ![Yongyao\_Jiang](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@Yongyao\_Jiang](https://discuss.elastic.co/u/Yongyao_Jiang)\
**Post date:** [December 15, 2015, 3:21pm UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/6 "2015-12-15T15:21:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yongyao\_Jiang](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@Yongyao\_Jiang](https://discuss.elastic.co/u/Yongyao_Jiang)\
**Post date:** [December 15, 2015, 5:57pm UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/7 "2015-12-15T17:57:27Z")

</div>

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

And also, I have the following setup:  
discovery.zen.ping.unicast.hosts: ["10.0.0.4", "10.0.0.5"]  
network.host: 192.168.0.1 (default)

Thanks,

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2015, 6:43pm UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/8 "2015-12-15T18:43:05Z")

</div>

You need to set `network.host: 10.0.0.5`

---

<div class="post-metadata">

**Author:** ![Yongyao\_Jiang](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@Yongyao\_Jiang](https://discuss.elastic.co/u/Yongyao_Jiang)\
**Post date:** [December 15, 2015, 7:03pm UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/9 "2015-12-15T19:03:47Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:30pm UTC](https://discuss.elastic.co/t/set-up-es-cluster-on-azure-discovery-problem/37195/10 "2017-07-05T23:30:50Z")

</div>


