# Setting up elastic search master and data node configuration in two different servers

**URL:** https://discuss.elastic.co/t/setting-up-elastic-search-master-and-data-node-configuration-in-two-different-servers/98012
**Category:** Elasticsearch
**Created:** [August 23, 2017, 7:07am UTC](https://discuss.elastic.co/t/setting-up-elastic-search-master-and-data-node-configuration-in-two-different-servers/98012 "2017-08-23T07:07:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![virat](https://avatars.discourse-cdn.com/v4/letter/v/ecccb3/32.png) [@virat](https://discuss.elastic.co/u/virat)
#### Post date: [August 23, 2017, 7:07am UTC](https://discuss.elastic.co/t/setting-up-elastic-search-master-and-data-node-configuration-in-two-different-servers/98012/1 "2017-08-23T07:07:43Z")

</div>

I have two elasticsearch running on two different servers, I have same indexes on both servers. I want to have a master and data node configuration, for that below are the configuration changes which I did so far:

Master Node -\> xx.xx.xx.xx:9200

cluster-name : ABC  
Node-name : XYZ  
node.master: true  
node.data: false  
node.ingest: false  
http.port: 9200  
discovery.zen.ping.unicast.hosts: ["127.0.0.1","zz.zz.zz.zz:9200"]

Data Node: -\> zz.zz.zz.zz:9200

cluster-name : ABC  
[node.name](http://node.name): PQR  
node.master: false  
node.data: true  
node.ingest: false  
http.port: 9200  
discovery.zen.ping.unicast.hosts: ["127.0.0.1","xx.xx.xx.xx:9200"]

The problems are -

1. When I search some indexes from master I get the result but when I hit second server(having only data node), I get master\_not\_discovered\_exception. reason ?
2. How to check if master and data node configuration is working properly?

I am a newbie here 🙂

---

<div class="post-metadata">

### Author: ![virat](https://avatars.discourse-cdn.com/v4/letter/v/ecccb3/32.png) [@virat](https://discuss.elastic.co/u/virat)
#### Post date: [August 23, 2017, 5:33pm UTC](https://discuss.elastic.co/t/setting-up-elastic-search-master-and-data-node-configuration-in-two-different-servers/98012/2 "2017-08-23T17:33:20Z")

</div>

I have got the solution. As I installed through rpm packages in the logs I was getting below issue:

[2017-08-24T03:50:01,331][INFO][o.e.d.z.ZenDiscovery] [node-2] failed to send join request to master [{node-1}{sYqhGZc4QyK\_cbZ9\_cz8gQ}{BBHUedE6Roaw0AMiYnQwIg}{172.31.4.119}{172.31.4.119:9300}], reason [RemoteTransportException[[node-1][172.31.4.119:9300][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {node-2}{sYqhGZc4QyK\_cbZ9\_cz8gQ}{FbDpyWy2S7SS1c8TvLsnfQ}{172.31.4.118}{172.31.4.118:9300}, found existing node {node-1}{sYqhGZc4QyK\_cbZ9\_cz8gQ}{BBHUedE6Roaw0AMiYnQwIg}{172.31.4.119}{172.31.4.119:9300} with the same id but is a different node instance]; ]

I had deleted contents of data folder(/var/lib/elasticsearch/nodes/0) and restarted both the servers and it worked for me.

---

<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: [September 20, 2017, 5:33pm UTC](https://discuss.elastic.co/t/setting-up-elastic-search-master-and-data-node-configuration-in-two-different-servers/98012/3 "2017-09-20T17:33:21Z")

</div>

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