# Master node and data node configuration

**URL:** https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259
**Category:** Elasticsearch
**Created:** [May 17, 2018, 6:01am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259 "2018-05-17T06:01:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![remo](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@remo](https://discuss.elastic.co/u/remo)
#### Post date: [May 17, 2018, 6:01am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/1 "2018-05-17T06:01:56Z")

</div>

I have made changes in elasticsearch.yml for the instance running on my machine and I have set the instance as master node . Similarly I have setup the instances running on other two machines as data nodes. what should be the configurations made in all the three elasticsearch instance's yml file so that both data nodes are connected to master node? I am attaching the yml files for both master and data nodes. But I am unable to start the instances with these configurations. Hoping for a solution for this.

Thank you.!

yml for master node:

cluster.name: sample\_cluster  
node.name: master\_node  
node.master: true  
node.data: false  
index.number\_of\_shards: 1  
index.number\_of\_replicas: 0  
bootstrap.mlockall: true  
network.host: 192.168.4.42  
discovery.zen.minimum\_master\_nodes: 1  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["data\_node", "master\_node"]

yml for data node:

cluster.name: sample\_cluster  
node.name: data\_node  
node.master: false  
node.data: true  
index.number\_of\_shards: 1  
index.number\_of\_replicas: 0  
bootstrap.mlockall: true  
network.host: 192.168.4.43  
discovery.zen.ping.unicast.hosts: ["data\_node", "master\_node"]

---

<div class="post-metadata">

### Author: ![mjunaidmuzammil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mjunaidmuzammil/32/56910_2.png) [@mjunaidmuzammil](https://discuss.elastic.co/u/mjunaidmuzammil)
#### Post date: [May 17, 2018, 6:16am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/2 "2018-05-17T06:16:04Z")

</div>

Hi,

What is the error that you are getting? One possible error is that you have provided same node names for both the data nodes, which might be a source of conflict. The node names should be unique for each node.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 17, 2018, 6:24am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/3 "2018-05-17T06:24:41Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

---

<div class="post-metadata">

### Author: ![remo](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@remo](https://discuss.elastic.co/u/remo)
#### Post date: [May 17, 2018, 9:44am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/4 "2018-05-17T09:44:34Z")

</div>

Hi,  
Yes I have given different names to both data nodes but in the given pictures i took only one data node and one master node  
discovery.zen.ping.unicast.hosts: ["data\_node", "master\_node"]  
what should I write in place of ["data\_node", "master\_node"] ,I have a doubt that should write in elasticsearch.yml of master node the ip address of the machine on which data node is running ?  
The instances are not even getting started with the given configurations. When I am starting elasticsearch.bat instance is starting but immediately getting closed.

---

<div class="post-metadata">

### Author: ![mjunaidmuzammil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mjunaidmuzammil/32/56910_2.png) [@mjunaidmuzammil](https://discuss.elastic.co/u/mjunaidmuzammil)
#### Post date: [May 18, 2018, 5:57am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/5 "2018-05-18T05:57:34Z")

</div>

@remo Unicast hosts list should only have a list of master eligible nodes. Data nodes shouldn't be added to this list. For more details, you can refer

[https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-discovery-zen.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-discovery-zen.html)

---

<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: [May 18, 2018, 6:05am UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/6 "2018-05-18T06:05:36Z")

</div>

I would recommend that you set `node.master` to `true` and `discovery.zen.minimum_master_nodes` to `2` on all three nodes. `discovery.zen.ping.unicast.hosts` should then contain a list of the IP addresses of the other nodes in the cluster on each node. This will allow your cluster to be able to continue to operate and elect a master even if one of your nodes goes down.

With your current setup you have a single point of failure in your dedicated master node, and if this goes down the cluster will no longer be fully operable.

---

<div class="post-metadata">

### Author: ![remo](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@remo](https://discuss.elastic.co/u/remo)
#### Post date: [May 25, 2018, 1:47pm UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/7 "2018-05-25T13:47:40Z")

</div>

i am unable to start elasticsearch when im configuring it as only data node. also i have xpack installed on elk . Is that the resaon because of which my elastic search server is not starting after doing the configurations you said ?

---

<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: [June 22, 2018, 1:47pm UTC](https://discuss.elastic.co/t/master-node-and-data-node-configuration/132259/8 "2018-06-22T13:47:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
