# Master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster

**URL:** <https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304>\
**Category:** Elasticsearch\
**Created:** [April 11, 2019, 1:34am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304 "2019-04-11T01:34:47Z")\
**Posts on this page:** 4\
**Page:** 4

<div class="post-metadata">

**Author:** ![Ken\_Liao1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ken_liao1/32/45511_2.png) [@Ken\_Liao1](https://discuss.elastic.co/u/Ken_Liao1)\
**Post date:** [May 3, 2019, 5:10pm UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304/61 "2019-05-03T17:10:39Z")

</div>

OK, I will do that, thanks!

---

<div class="post-metadata">

**Author:** ![vaisov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaisov/32/87927_2.png) [@vaisov](https://discuss.elastic.co/u/vaisov)\
**Post date:** [May 15, 2019, 9:42am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304/62 "2019-05-15T09:42:15Z")

</div>

I had the same issue on Kubernetes using StatefulSet. The fix which worked and still works for me, looks like:

```
# Source: elk/templates/02-elasticsearch-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: elasticsearch-config
  namespace: transactions-api
data:
  elasticsearch.yml: |2+
    cluster.name: "po"
    cluster.initial_master_nodes:
    - elasticsearch-po-0
    - elasticsearch-po-1
    - elasticsearch-po-2
    - elasticsearch-po-3
    - elasticsearch-po-4
    - elasticsearch-po-5
    node.name: ${HOSTNAME}
    # 512Mb per shard being indexed. 2xprimary,2xreplica = 2048Mb
    # https://www.elastic.co/guide/en/elasticsearch/reference/current/indexing-buffer.html
    indices.memory.index_buffer_size: 25%
    indices.memory.min_index_buffer_size: 96mb
    indices.memory.max_index_buffer_size: 2048mb
    thread_pool.write.queue_size: 400

    cluster.routing.allocation.awareness.attributes: rack_id
    cluster.routing.allocation.awareness.force.rack_id.values: 1,2

    xpack.monitoring.collection.enabled: true
    # Disabling unused x-pack components (some are disabled by default)
    xpack.security.enabled: false
    xpack.security.audit.enabled: false
    # ML stuff enabled by default
    xpack.ml.enabled: false
    node.ml: false

    network.host: _site_,_lo_
    # TODO: dynamic configuration needed
    discovery.zen.ping.unicast.hosts:
    - elasticsearch-po-0.elasticsearch-po
    - elasticsearch-po-1.elasticsearch-po
    - elasticsearch-po-2.elasticsearch-po
    - elasticsearch-po-3.elasticsearch-po
    - elasticsearch-po-4.elasticsearch-po
    - elasticsearch-po-5.elasticsearch-po

```

The issue was that ES can't resolve the hostnames like `elasticsearch-po-5`, it can only resolve these: `elasticsearch-po-5.elasticsearch-po`. And since `node.name` is `elasticsearch-po-5` it didn't work. And I was getting the similar name mismatch error. I guess it could be set up more clean than in my case.

If needed I can attach my helm template file as well.

---

<div class="post-metadata">

**Author:** ![Ken\_Liao1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ken_liao1/32/45511_2.png) [@Ken\_Liao1](https://discuss.elastic.co/u/Ken_Liao1)\
**Post date:** [May 17, 2019, 5:04pm UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304/63 "2019-05-17T17:04:57Z")

</div>

> [@vaisov](#):
>
> Kubernetes

I deployed it in Docker Swarm, to fix this issue, I separated ES into 3 coordination nodes, 3 master nodes, 3 data nodes. and then deploy 3 master nodes in 'replicated' mode instead of "global", then set "initial\_master\_nodes" with master service name. now it works fine.

> [@](#):
>
> services:  
> coordination:  
> image: [docker.elastic.co/elasticsearch/elasticsearch:7.0.1](http://docker.elastic.co/elasticsearch/elasticsearch:7.0.1)  
> ports:  
> - "9200:9200"  
> - "9300:9300"  
> environment:  
> ES\_JAVA\_OPTS: "-Xmx256m -Xms256m"  
> discovery.seed\_hosts: master1,master2,master3  
> cluster.initial\_master\_nodes: master1,master2,master3  
> cluster.name: "noosh-elk-docker-cluster"  
> ...  
> deploy:  
> endpoint\_mode: vip  
> mode: 'global'  
> placement:  
> constraints: [node.labels.app\_role == elasticsearch]
> 
> master1:  
> image: [docker.elastic.co/elasticsearch/elasticsearch:7.0.1](http://docker.elastic.co/elasticsearch/elasticsearch:7.0.1)  
> environment:  
> ES\_JAVA\_OPTS: "-Xmx256m -Xms256m"  
> discovery.seed\_hosts: master1,master2,master3  
> cluster.initial\_master\_nodes: master1,master2,master3  
> cluster.name: "noosh-elk-docker-cluster"  
> network.host: 0.0.0.0  
> node.master: "true"  
> node.data: "false"  
> node.ingest: "false"  
> node.name: "master1"  
> ...  
> deploy:  
> endpoint\_mode: dnsrr  
> mode: 'replicated'  
> replicas: 1  
> placement:  
> constraints: [node.labels.app\_role == elasticsearch]  
> volumes:  
> - /docker/elk/elasticsearch/master1:/usr/share/elasticsearch/data
> 
> master2:  
> ....
> 
> master3:  
> ...
> 
> data1:  
> image: [docker.elastic.co/elasticsearch/elasticsearch:7.0.1](http://docker.elastic.co/elasticsearch/elasticsearch:7.0.1)  
> environment:  
> ES\_JAVA\_OPTS: "-Xmx256m -Xms256m"  
> discovery.seed\_hosts: master1,master2,master3  
> cluster.initial\_master\_nodes: master1,master2,master3  
> cluster.name: "noosh-elk-docker-cluster"  
> network.host: 0.0.0.0  
> node.master: "false"  
> node.data: "true"  
> node.ingest: "false"  
> node.name: "data1"  
> ...  
> deploy:  
> endpoint\_mode: dnsrr  
> mode: 'replicated'  
> replicas: 1  
> placement:  
> constraints: [node.labels.app\_role == elasticsearch]  
> volumes:  
> - /docker/elk/elasticsearch/data1:/usr/share/elasticsearch/data
> 
> data2:  
> ...
> 
> data3:  
> ...

---

<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:** [June 14, 2019, 5:05pm UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304/64 "2019-06-14T17:05:10Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304.md?page=3)
