# Setting up cluster with client, master & data node

**URL:** https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723
**Category:** Elasticsearch
**Created:** [March 20, 2018, 10:06am UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723 "2018-03-20T10:06:04Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![subhraakanil](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@subhraakanil](https://discuss.elastic.co/u/subhraakanil)
#### Post date: [March 20, 2018, 10:06am UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/1 "2018-03-20T10:06:04Z")

</div>

Hi Team,

We are making POC on elasticsearch so that we can use it in future.Though, I am newbie in elasticsearch.

We have three CentOs boxes and our requirement is to set up a cluster containing client, master & data node.

1. We have planned to run 2 instances of elasticsearch in the first server on different port i.e. **[9200,9201]** and made them as client node.

2. In the second server, we are going to run 4 instances of elasticsearch on different port i.e.**[9200,9201,9202,9203]** and made them behave as master node.

3. In the third server, we are going to run 4 instances of elasticsearch on different port i.e.**[9200,9201,9202,9203]** and made them behave as data node.

`node.master: false`  
`node.data: false`  
`node.ingest: true`

This approach i.e. running multiple instances in the same server is just for POC, if we get success then we will make elasticsearch instance and server in [1:1] .

We have configured each elasticsearch.yml in the below mentioned way:

We have kept the `cluster.name` property same in all the 10 instances inside **elasticsearch.yaml**.

We have kept `network.host` for all the client nodes same, as they are running inside same server. We have done the same thing for master & data node.

For all the 10 instance running, i.e. client\*\*(2)\*\* , master\*\*(4)\*\* & data\*\*(4)\*\*, we have mentioned all the 10 ip's along with port number for `discovery.zen.ping.unicast.hosts`attribute inside all the elasticsearch.yml instance.

```
discovery.zen.ping.unicast.hosts: 
["<client_node_ip>:9200","<client_node_ip>:9201","<master_node_ip>:9200","<master_node_ip>:9201","<master_node_ip>:9202","<master_node_ip>:9203","<data_node_ip>:9200","<data_node_ip>:9201","<data_node_ip>:9202","<data_node_ip>:9203"]

```

Last day, I have tried the same, where I have run single elastic instance in each server, considering once master and two data and successfully form the cluster and validated with :

`curl -XGET 'http://<server_ip>:9200/_cluster/state?pretty'`

It is showing all the three nodes.

But, today after doing the above mentioned modification i.e. (2 elasticsearch client instance in first server, 4 elasticsearch master instance in second server, 4 elasticsearch data instance in third sever), I am not been able to form the cluster.

After pinging, each instance individually , I am getting response:

curl -XGET 'http://\<server\_ip\>:9200'

But, they are not inside cluster.

While applying the below command from any of the master node, it is just showing that particular node:  
`curl -XGET 'http://<master_server_ip>:9200/_cluster/state?pretty'`

While applying the below command from any of the client node, it is just giving the following error:  
`curl -XGET 'http://<client_server_ip>:9200/_cluster/state?pretty'`

_{_  
\_ "error" : {\_  
\_ "root\_cause" : [\_  
\_ {\_  
\_ "type" : "master\_not\_discovered\_exception",\_  
\_ "reason" : null\_  
\_ }\_  
\_ ],\_  
\_ "type" : "master\_not\_discovered\_exception",\_  
\_ "reason" : null\_  
\_ },\_  
\_ "status" : 503\_  
_}_

---

<div class="post-metadata">

### Author: ![subhraakanil](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@subhraakanil](https://discuss.elastic.co/u/subhraakanil)
#### Post date: [March 20, 2018, 6:34pm UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/2 "2018-03-20T18:34:07Z")

</div>

We are facing the issue as we have mentioned http `host.port` in place of `transport.profiles.default.port` as part of the value of the attribute named as `discovery.zen.ping.unicast.hosts` inside **elasticsearch.yml** file.  
After changing it accordingly, my issue got resolved.And, we have successfully build the cluster.  
After, running the below command from client node, we have got to see all 10 nodes that has formed the cluster.

`curl -XGET 'http://<client_server_ip>:9200/_cluster/state?pretty`

---

<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: [March 20, 2018, 6:36pm UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/3 "2018-03-20T18:36:45Z")

</div>

If the servers are of the same specification, I would recommend setting up one of each node (master, data and coordinating node) type per server as that is a more realistic deployment. You ideally want to have 3 dedicated master nodes and make sure they are distributed across different hosts in order too provide high availability. The same thing goes for data nodes.

---

<div class="post-metadata">

### Author: ![subhraakanil](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@subhraakanil](https://discuss.elastic.co/u/subhraakanil)
#### Post date: [March 20, 2018, 6:47pm UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/4 "2018-03-20T18:47:10Z")

</div>

Thank you very much for your advice @Christian_Dahlqvist😀  
What I have understood from your advice, that it is better to run single elastic instance in each server irrespective of the node type to ensure high availability.e.g. if I want three master nodes, then we have to configure three servers to run individual elasticsearch instance , where each instance will be considered as master node(i.e. I have to configure elasticsearch.yml accordingly).Same is applicable for data nodes as well.

Kindly correct me sir, If I have not understood your point.

Is client node & coordinating node are the same thing?

---

<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: [March 20, 2018, 6:58pm UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/5 "2018-03-20T18:58:25Z")

</div>

Having a separate host for each node is ideal. For smaller clusters having 3 nodes with the default configuration is however often fine. Just because you can have dedicated node types does not necessarily mean that you should.

If you however still want to experiment with dedicated node types, you could deploy 3 nodes (one dedicated master, one dedicated data and one coordinating node) on each host.

---

<div class="post-metadata">

### Author: ![subhraakanil](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@subhraakanil](https://discuss.elastic.co/u/subhraakanil)
#### Post date: [March 20, 2018, 7:00pm UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/6 "2018-03-20T19:00:28Z")

</div>

Thanks @Christian_Dahlqvist . It has been acknowledged.

---

<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: [April 17, 2018, 7:00pm UTC](https://discuss.elastic.co/t/setting-up-cluster-with-client-master-data-node/124723/7 "2018-04-17T19:00:37Z")

</div>

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