# Data node can't find master node ,but master can find data node

**URL:** <https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654>\
**Category:** Elasticsearch\
**Created:** [July 28, 2016, 4:22pm UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654 "2016-07-28T16:22:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 28, 2016, 4:22pm UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/1 "2016-07-28T16:22:58Z")

</div>

here is log info as below:

> [2016-07-29 00:05:43,764][INFO][cluster.service] [data\_node\_144] detected\_master {master\_node\_200}{KPQpU4cdRyiqCT488ZFglg}{192.168.201.200}{192.168.201.200:9300}{data=false, master=true}, added {{master\_node\_200}{KPQpU4cdRyiqCT488ZFglg}{192.168.201.200}{192.168.201.200:9300}{data=false, master=true},}, reason: zen-disco-receive(from master [{master\_node\_200}{KPQpU4cdRyiqCT488ZFglg}{192.168.201.200}{192.168.201.200:9300}{data=false, master=true}])  
> [2016-07-29 00:05:43,915][INFO][discovery.zen] [data\_node\_144] master\_left [{master\_node\_200}{KPQpU4cdRyiqCT488ZFglg}{192.168.201.200}{192.168.201.200:9300}{data=false, master=true}], reason [transport disconnected]  
> [2016-07-29 00:05:43,974][WARN][discovery.zen] [data\_node\_144] master left (reason = transport disconnected), current nodes: {{data\_node\_144}{LkMlU7XeSqC-j0K\_o05iUw}{192.168.201.144}{192.168.201.144:9300}{master=false},{data\_node\_148}{FKdVDjWjQ4eykqkMNRNxUQ}{192.168.201.148}{192.168.201.148:9300}{master=false},{master\_node\_102}{zQR04axjRxGFhmVxw3N4Pg}{192.168.201.102}{192.168.201.102:9300}{data=false, master=true},{master\_node\_103}{v83JEFKaQa6gXrG8o5xfBw}{192.168.201.103}{192.168.201.103:9300}{data=false, master=true},{data\_node\_145}{dF-4DvGlT22v2vI68PrIkQ}{192.168.201.145}{192.168.201.145:9300}{master=false},{data\_node\_146}{TDPHZWaRRm-lTfM2EM3bPQ}{192.168.201.146}{192.168.201.146:9300}{master=false},{master\_node\_101}{eqxEaFh8TeqR4VmhKPdT\_g}{192.168.201.101}{192.168.201.101:9300}{data=false, master=true},{data\_node\_147}{-evmqt\_nSV-RSeXTZ2w15w}{192.168.201.147}{192.168.201.147:9300}{master=false},}  
> [2016-07-29 00:05:43,974][INFO][cluster.service] [data\_node\_144] removed {{master\_node\_200}{KPQpU4cdRyiqCT488ZFglg}{192.168.201.200}{192.168.201.200:9300}{data=false, master=true},}, reason: zen-disco-master\_failed ({master\_node\_200}{KPQpU4cdRyiqCT488ZFglg}{192.168.201.200}{192.168.201.200:9300}{data=false, master=true})  
> [2016-07-29 00:05:43,974][WARN][cluster.service] [data\_node\_144] failed to notify ClusterStateListener  
> java.lang.IllegalStateException: master not available when registering auto-generated license  
> at org.elasticsearch.license.plugin.core.LicensesService.requestTrialLicense(LicensesService.java:749)  
> at org.elasticsearch.license.plugin.core.LicensesService.clusterChanged(LicensesService.java:483)  
> at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:610)  
> at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:772)  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
> at java.lang.Thread.run(Thread.java:745)

and the configure of data node:

> cluster.name: es\_cluster  
> node.name: data\_node\_144  
> node.master: false  
> node.data: true  
> path.data: /data/es/data  
> path.logs: /data/es/logs  
> network.host: 0.0.0.0  
> network.publish\_host: 0.0.0.0  
> gateway.recover\_after\_nodes: 2  
> discovery.zen.ping\_timeout: 60s  
> discovery.zen.ping.unicast.hosts: ["192.168.201.200","192.168.201.101","192.168.201.102","192.168.201.1  
> 03","192.168.201.144","192.168.201.145","192.168.201.146","192.168.201.147","192.168.201.148" ]  
> discovery.zen.minimum\_master\_nodes: 3

configure of master node:

> cluster.name: es\_cluster  
> node.name: master\_node\_200  
> node.master: true  
> node.data: false  
> path.data: /data/es/data  
> path.logs: /data/es/logs  
> network.host: 0.0.0.0  
> network.publish\_host: 0.0.0.0  
> gateway.recover\_after\_nodes: 2  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping\_timeout: 60s  
> discovery.zen.ping.unicast.hosts: ["192.168.201.200","192.168.201.101","192.168.201.102","192.168.201.103"]  
> discovery.zen.minimum\_master\_nodes: 3  
> bootstrap.mlockall: true

it's weird that master node can find the data node.  
PS. master node : "192.168.201.200","192.168.201.101","192.168.201.102","192.168.201.103",192.168.201.200" and others are data node.

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 28, 2016, 7:05pm UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/2 "2016-07-28T19:05:54Z")

</div>

> [@xzycn](#):
>
> discovery.zen.ping.unicast.hosts: ["192.168.201.200","192.168.201.101","192.168.201.102","192.168.201.103","192.168.201.144","192.168.201.145","192.168.201.146","192.168.201.147","192.168.201.148"]

There is no need to put all data nodes into this list, all nodes in your cluster need only

> [@xzycn](#):
>
> discovery.zen.ping.unicast.hosts: ["192.168.201.200","192.168.201.101","192.168.201.102","192.168.201.103"]

What is the size of your cluster, and why you need 4 master nodes? Shouldn't 3 of them be enough?

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 12:05am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/3 "2016-07-29T00:05:54Z")

</div>

1. 5 data nodes and 4 master nodes,total 130G+ data size in my cluster.
2. i think 4 master nodes can reduce the possibility of Split Brain.
3. i don't have an idea of how many master nodes should i set,maybe should i set one master node to a client 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:** [July 29, 2016, 12:41am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/4 "2016-07-29T00:41:45Z")

</div>

You only really need 3 masters to form a quorum.

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 1:15am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/5 "2016-07-29T01:15:06Z")

</div>

hi,i have change one master node to client node and restart 5 data nodes,the issue is still exist.😭

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 29, 2016, 4:48am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/6 "2016-07-29T04:48:14Z")

</div>

3 master nodes are enough, and set `discovery.zen.minimum_master_nodes:` to 2.

How many data nodes can't join the cluster? If it's only one node, I would rather forget about that node and set up another one to replace the failed one.

> [@xzycn](#):
>
> java.lang.IllegalStateException: master not available when registering auto-generated license at org.elasticsearch.license.plugin.core.LicensesService.requestTrialLicense(LicensesService.java:749) at org.elasticsearch.license.plugin.core.LicensesService.clusterChanged(LicensesService.java:483) at

Is the failed node a new one that you are trying to put into the cluster? Could you try to install/reinstall the license plugin on all nodes? Has the trial license expired?

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 5:07am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/7 "2016-07-29T05:07:53Z")

</div>

1. i have set discovery.zen.minimum\_master\_nodes: to 2,it still cannot work.
2. all 5 data nodes ocurred the issue.
3. i only explicitly install license plugin in 5 data nodes,don't install in master nodes,this could be the poiont?

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 29, 2016, 5:15am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/8 "2016-07-29T05:15:34Z")

</div>

License plugin must be installed on all nodes: client, master, data.

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 5:19am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/9 "2016-07-29T05:19:33Z")

</div>

thank you very much,one client node work now after i install license plugin on it and restart.  
i will try other nodes.😚

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 29, 2016, 5:24am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/10 "2016-07-29T05:24:00Z")

</div>

The trial license will expire after a month, you need to request a free license and update for your cluster.

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 5:31am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/11 "2016-07-29T05:31:25Z")

</div>

btw,

> discovery.zen.ping.unicast.hosts: ["192.168.201.200","192.168.201.101","192.168.201.102","192.168.201.103","192.168.201.144","192.168.201.145","192.168.201.146","192.168.201.147","192.168.201.148"]  
> what exactly should i set?  
> Should i only set master nodes ip in this field? Or other data nodes ip in this field.  
> And i have another question,should i set the filed "discovery.zen.minimum\_master\_nodes: 3" in non-master nodes?of course and the field "gateway.recover\_after\_nodes: 2" and someelse that iS master‘s functionalities.

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 5:34am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/12 "2016-07-29T05:34:59Z")

</div>

i don't know how to get a free license, i install it througth the command "plugin install license" all the time before.

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 29, 2016, 6:06am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/13 "2016-07-29T06:06:43Z")

</div>

You can request a free basic license here [https://register.elastic.co/marvel\_register](https://register.elastic.co/marvel_register)

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 6:25am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/14 "2016-07-29T06:25:31Z")

</div>

i want to know if all nodes uninstall the license plugin,and there is no need to install it,is it?

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 29, 2016, 6:26am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/15 "2016-07-29T06:26:26Z")

</div>

If you don't need marvel, I don't think that you need license plugin.

---

<div class="post-metadata">

**Author:** ![xzycn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xzycn/32/11598_2.png) [@xzycn](https://discuss.elastic.co/u/xzycn)\
**Post date:** [July 29, 2016, 6:28am UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/16 "2016-07-29T06:28:27Z")

</div>

thank you for your answers,have a nice day,it's afternoon in my location.😘

---

<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, 10:31pm UTC](https://discuss.elastic.co/t/data-node-cant-find-master-node-but-master-can-find-data-node/56654/17 "2017-07-05T22:31:53Z")

</div>


