# Setting multi node on Elasticsearch 2.0 is not working

**URL:** <https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656>\
**Category:** Elasticsearch\
**Created:** [November 16, 2015, 9:31am UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656 "2015-11-16T09:31:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpong](https://avatars.discourse-cdn.com/v4/letter/g/d6d6ee/32.png) [@gpong](https://discuss.elastic.co/u/gpong)\
**Post date:** [November 16, 2015, 9:31am UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656/1 "2015-11-16T09:31:27Z")

</div>

I started to use Elasticsearch 2.0. When I want to use multiple node on one cluster, it seems it's not not working.

I tried two different methods to create multi node.

First, I used my localhost and created two instances of Elasticsearch 2.0.

Second, I used two different computers (one instance on my local computer and one instance in server and I used discovery.zen.ping.unicast.hosts to bind them) for this multi node.

It's different from Elasticsearch 1.x version. And I read that multicast has already removed. So how to setting the config file for multi node on a cluster in Elasticsearch 2.0??

Here is my config setting for different server

cluster.name: "cluster\_node\_1"  
node.name: "test1\_node1\_ES2"  
http.cors.enabled: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 1  
transport.tcp.port: 9300  
http.port: 9200  
http.cors.enable: true  
network.bind\_host: 10.21.126.151  
network.publish\_host: 10.21.126.151  
network.host: 10.21.126.151  
discovery.zen.ping.timeout: 3s  
discovery.zen.ping.unicast.hosts: ["10.21.126.151", "10.21.126.145"]

---

<div class="post-metadata">

**Author:** ![radoo](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@radoo](https://discuss.elastic.co/u/radoo)\
**Post date:** [November 16, 2015, 11:23am UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656/2 "2015-11-16T11:23:32Z")

</div>

> [@gpong](#):
>
> discovery.zen.ping.unicast.hosts: ["10.21.126.151", "10.21.126.145"]

Hi,  
please add also ports to your configurtation for the 'other' nodes in your cluster:  
discovery.zen.ping.unicast.hosts: ["10.21.126.145:"]

I'm not sure if network.publish\_host: 10.21.126.151 is still required for this configuration.

Rado

---

<div class="post-metadata">

**Author:** ![gpong](https://avatars.discourse-cdn.com/v4/letter/g/d6d6ee/32.png) [@gpong](https://discuss.elastic.co/u/gpong)\
**Post date:** [November 17, 2015, 1:27am UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656/3 "2015-11-17T01:27:11Z")

</div>

Thanks Rado , it's works perfectly

---

<div class="post-metadata">

**Author:** ![John\_Sotiropoulos](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@John\_Sotiropoulos](https://discuss.elastic.co/u/John_Sotiropoulos)\
**Post date:** [December 31, 2015, 8:15pm UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656/4 "2015-12-31T20:15:09Z")

</div>

Hello there,

## I had the same problem. I have 1 master, 2 data nodes and 1 client in 4 different vms. I did the following and I think it works fine:

master:  
_node.master: true_  
_node.data: false_  
_network.host: 192.168.56.103_

data nodes:  
_node.master: false_  
_discovery.zen.ping.unicast.hosts: ["192.168.56.103:9300"]_  
(node.data is set to true by default in ES 2.X)

## client node: _node.master: false_ _node.data: true_ _http.enabled: true_ _discovery.zen.ping.unicast.hosts: ["192.168.56.103:9300"]_

Also, all the nodes have the same _[cluster.name](http://cluster.name)_ and I have also set the _network.host: 192.168.56.X_ for each one.

Question1:  
Is this configuration ok?

Question2:  
Is _discovery.zen.minimum\_master\_nodes: 1_ necessary since I have 1 master?

Question3:  
In _discovery.zen.ping.unicast.hosts_ I tried to assign it with _["192.168.56.103:9200"]_ but it didn't work with 9200 port. Is this normal because in [stackoverflow](http://stackoverflow.com/questions/33685577/setting-multi-node-on-elasticsearch-2-0) mention that it works with port 9200.

P.S. It would be great to see a final stable consistent documentation of the fantastic new version of Elasticsearch (I have spent many hours trying to make a simple cluster work).

Thank you in advance! 😃

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 31, 2015, 11:18pm UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656/5 "2015-12-31T23:18:44Z")

</div>

> [@John\_Sotiropoulos](#):
>
> Question1:Is this configuration ok?

I would recommend making the data nodes master eligible as well. You always want 3 master eligible nodes if possible as this improves stability.

> [@John\_Sotiropoulos](#):
>
> Question2:Is discovery.zen.minimum\_master\_nodes: 1 necessary since I have 1 master?

That is correct, but if you follow the recommendation and have 3 master eligible nodes you should set it to 2.

> [@John\_Sotiropoulos](#):
>
> Question3:In discovery.zen.ping.unicast.hosts I tried to assign it with ["192.168.56.103:9200"] but it didn't work with 9200 port. Is this normal because in stackoverflow mention that it works with port 9200.

Port 9200 is by dy default used for HTTP client requests. For internal cluster communication port 9300 is used, and that is what you should use in the unicast config unless you have changed the default ports.

---

<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:27pm UTC](https://discuss.elastic.co/t/setting-multi-node-on-elasticsearch-2-0-is-not-working/34656/6 "2017-07-05T23:27:34Z")

</div>


