# Elasticsearch not handle autodiscover after master node down

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-handle-autodiscover-after-master-node-down/191546>\
**Category:** Elasticsearch\
**Created:** [July 21, 2019, 11:06pm UTC](https://discuss.elastic.co/t/elasticsearch-not-handle-autodiscover-after-master-node-down/191546 "2019-07-21T23:06:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rizkan\_abadi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rizkan_abadi/32/49469_2.png) [@rizkan\_abadi](https://discuss.elastic.co/u/rizkan_abadi)\
**Post date:** [July 21, 2019, 11:06pm UTC](https://discuss.elastic.co/t/elasticsearch-not-handle-autodiscover-after-master-node-down/191546/1 "2019-07-21T23:06:54Z")

</div>

##### Node1

cluster.name: trinix-cluster  
node.name: es-node-01  
node.data: true  
node.master: true

cluster.initial\_master\_nodes:

- es-node-01
- es-node-02

indices.memory.index\_buffer\_size: 1gb  
indices.fielddata.cache.size: 1g  
thread\_pool:  
search:  
size: 1000  
queue\_size: 4000  
transport.host: 192.168.2.6  
transport.tcp.port: 9300  
discovery.find\_peers\_interval: 1s  
search.max\_buckets: 9000000

discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping.unicast.hosts: ["es-node-01", "es-node-02"]  
network.publish\_host: ["es-node-01", "es-node-02"]

network.host: 0.0.0.0  
http.port: 9200

##### Node2

cluster.name: trinix-cluster  
node.name: es-node-01  
node.data: true  
node.master: true

cluster.initial\_master\_nodes:

- es-node-01
- es-node-02

indices.memory.index\_buffer\_size: 1gb  
indices.fielddata.cache.size: 1g  
thread\_pool:  
search:  
size: 1000  
queue\_size: 4000  
transport.host: 192.168.2.4  
transport.tcp.port: 9300  
discovery.find\_peers\_interval: 1s  
search.max\_buckets: 9000000

discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping.unicast.hosts: ["es-node-01", "es-node-02"]  
network.publish\_host: ["es-node-01", "es-node-02"]

network.host: 0.0.0.0  
http.port: 9200

the problem is, if elasticsearch es-node-01 stopped, es-node-02 not handle as master

[2019-07-22T06:01:02,004][INFO][o.e.c.s.ClusterApplierService] [es-node-02] master node changed {previous [{es-node-01}{9Jb373AuT-iU\_pS9Wf1\_Iw}{XnG2oGApQ\_CmviKx7W0s4g}{192.168.2.6}{192.168.2.6:9300}{ml.machine\_memory=8196714496, ml.max\_open\_jobs=20, xpack.installed=true}], current }, term: 93, version: 3582, reason: becoming candidate: onLeaderFailure  
[2019-07-22T06:01:02,121][WARN][o.e.a.b.TransportShardBulkAction] [es-node-02] [[metricbeat-ps-app2-2019.07][0]] failed to perform indices:data/write/bulk[s] on replica [metricbeat-pojoksatu-app2-2019.07][0], node[9Jb373AuT-iU\_pS9Wf1\_Iw], [R], s[STARTED], a[id=0rBO-3qfQ6WcEry\_xvLgIg]  
org.elasticsearch.transport.NodeDisconnectedException: [es-node-01][192.168.2.6:9300][indices:data/write/bulk[s][r]] disconnected  
[2019-07-22T06:01:02,141][WARN][o.e.c.a.s.ShardStateAction] [es-node-02] no master known for action [internal:cluster/shard/failure] for shard entry [shard id [[metricbeat-pojoksatu-app2-2019.07][0]], allocation id [0rBO-3qfQ6WcEry\_xvLgIg], primary term [25], message [failed to perform indices:data/write/bulk[s] on replica [metricbeat-pojoksatu-app2-2019.07][0], node[9Jb373AuT-iU\_pS9Wf1\_Iw], [R], s[STARTED], a[id=0rBO-3qfQ6WcEry\_xvLgIg]], failure [NodeDisconnectedException[[es-node-01][192.168.2.6:9300][indices:data/write/bulk[s][r]] disconnected]], markAsStale [true]]  
[2019-07-22T06:01:02,121][WARN][o.e.c.NodeConnectionsService] [es-node-02] failed to connect to {es-node-01}{9Jb373AuT-iU\_pS9Wf1\_Iw}{XnG2oGApQ\_CmviKx7W0s4g}{192.168.2.6}{192.168.2.6:9300}{ml.machine\_memory=8196714496, ml.max\_open\_jobs=20, xpack.installed=true} (tried [1] times)  
org.elasticsearch.transport.ConnectTransportException: [es-node-01][192.168.2.6:9300] connect\_exception  
at

---

<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:** [July 22, 2019, 4:58am UTC](https://discuss.elastic.co/t/elasticsearch-not-handle-autodiscover-after-master-node-down/191546/2 "2019-07-22T04:58:56Z")

</div>

That is expected. Elasticsearch master election is based on consensus and a majority of master eligible nodes is required. You therefore need a minimum of 3 master eligible nodes in order to have a highly available cluster that can handle one master eligible node being down.

---

<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:** [August 19, 2019, 4:58am UTC](https://discuss.elastic.co/t/elasticsearch-not-handle-autodiscover-after-master-node-down/191546/3 "2019-08-19T04:58:59Z")

</div>

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