# Help, cant elect master

**URL:** <https://discuss.elastic.co/t/help-cant-elect-master/196587>\
**Category:** Elasticsearch\
**Created:** [August 23, 2019, 8:59pm UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587 "2019-08-23T20:59:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![drdevil44](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@drdevil44](https://discuss.elastic.co/u/drdevil44)\
**Post date:** [August 23, 2019, 8:59pm UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587/1 "2019-08-23T20:59:14Z")

</div>

Hi  
I have a six node cluster trying to upgrade to 7 from 6.8. Can't elect a master. Each node is a docker container on seperate machines. The config files on master are set:

```
 cluster.name: "docker-cluster"
network.host: 0.0.0.0
node.name: "bex"
network.publish_host: 10.230.0.1
node.master: true
node.data: true

# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
# discovery.zen.minimum_master_nodes: 2
path.repo: ["/backups", "/nfsbackup"]

discovery.seed_hosts:
    - 10.230.0.4
    - 10.230.0.3
      ##discovery.zen.ping.unicast.hosts:
logger.org.elasticsearch.cluster.coordination: TRACE

cluster.initial_master_nodes:
    - 10.230.0.1
    - 10.230.0.3
    - 10.230.0.4

```

Nodes are called bex, el3, el4.

Log sample bex: [https://pastebin.com/fz1u62rB](https://pastebin.com/fz1u62rB)

Log sample el3: [https://pastebin.com/ASXScgHy](https://pastebin.com/ASXScgHy)

Any help enormously appreciated!

---

<div class="post-metadata">

**Author:** ![elemus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elemus/32/61976_2.png) [@elemus](https://discuss.elastic.co/u/elemus)\
**Post date:** [August 23, 2019, 11:15pm UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587/2 "2019-08-23T23:15:54Z")

</div>

What is your `discovery.zen.ping.unicast.hosts` value in each node? can you share your elasticsearch.yml config file?

---

<div class="post-metadata">

**Author:** ![drdevil44](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@drdevil44](https://discuss.elastic.co/u/drdevil44)\
**Post date:** [August 23, 2019, 11:46pm UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587/3 "2019-08-23T23:46:28Z")

</div>

I read that had been depreciated in favour of seed nodes.

---

<div class="post-metadata">

**Author:** ![elemus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elemus/32/61976_2.png) [@elemus](https://discuss.elastic.co/u/elemus)\
**Post date:** [August 24, 2019, 12:27am UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587/4 "2019-08-24T00:27:07Z")

</div>

Your'e right.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [August 24, 2019, 4:24pm UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587/5 "2019-08-24T16:24:10Z")

</div>

I have same problem when I upgraded to 7.x

shutdown all cluster  
update all elasticsearch.yml file and add following

cluster.initial\_master\_nodes: ## keep node1 as master at first try.

Start all elasticsearch.  
once cluster up you can remove this line as now it will automatically elect master node.

---

<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 21, 2019, 4:37pm UTC](https://discuss.elastic.co/t/help-cant-elect-master/196587/6 "2019-09-21T16:37:12Z")

</div>

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