# Master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes elasticsearch

**URL:** https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster-and-this-node-must-discover-master-eligible-nodes-elasticsearch/214185
**Category:** Elasticsearch
**Tags:** docker
**Created:** [January 8, 2020, 8:15am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster-and-this-node-must-discover-master-eligible-nodes-elasticsearch/214185 "2020-01-08T08:15:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sandeep\_Kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeep_kumar4/32/60450_2.png) [@Sandeep\_Kumar4](https://discuss.elastic.co/u/Sandeep_Kumar4)
#### Post date: [January 8, 2020, 8:15am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster-and-this-node-must-discover-master-eligible-nodes-elasticsearch/214185/1 "2020-01-08T08:15:28Z")

</div>

```auto
curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty=true'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "master_not_discovered_exception",
        "reason" : null
      }
    ],
    "type" : "master_not_discovered_exception",
    "reason" : null
  },
  "status" : 503
}

```

---

<div class="post-metadata">

### Author: ![Sandeep\_Kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeep_kumar4/32/60450_2.png) [@Sandeep\_Kumar4](https://discuss.elastic.co/u/Sandeep_Kumar4)
#### Post date: [January 8, 2020, 8:20am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster-and-this-node-must-discover-master-eligible-nodes-elasticsearch/214185/2 "2020-01-08T08:20:19Z")

</div>

using docker-compose to setup two master and data nodes, getting above exception master not discovered yet.  
Below is my `docker-compose.yml`

```auto
version: '3.3'
volumes:
  data:
    driver: local
    driver_opts:
       type: none
       device: /data1/elasticsearch 
       o: bind

services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0
    container_name: es01
    volumes:
      - data:/usr/share/elasticsearch/data
    environment:
      - node.name=es01
      - node.master=true
      - node.data=true
      - cluster.name=apm-docker-cluster
      - discovery.seed_hosts=es02
      - cluster.initial_master_nodes=es01,es02
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms10g -Xmx10g"
      - XPACK_SECURITY_ENABLED=false
      - XPACK_MONITORING_ENABLED=false
      - XPACK_ML_ENABLED=false
      - XPACK_GRAPH_ENABLED=false
      - XPACK_WATCHER_ENABLED=false 
      - TZ=Asia/Kolkata
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    restart: "unless-stopped"
    logging:
      driver: 'json-file'
      options:
          max-size: '2m'
          max-file: '5'
    ports:
      - 9200:9200
      - 9300:9300
    extra_hosts:
      - "es01:xx.xx.xx.xx"
      - "es02:xx.xx.xx.xx"
      - "es03:xx.xx.xx.xx"
    network_mode: "bridge"
    labels:
      org.label-schema.group: "APM-monitoring"
    healthcheck:
      test: ["CMD", "curl", "--write-out", "'HTTP %{http_code}'", "--silent", "--output", "/dev/null", "http://es01:9200/"]
      retries: 10
      interval: 10s

```

---

<div class="post-metadata">

### Author: ![Sandeep\_Kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeep_kumar4/32/60450_2.png) [@Sandeep\_Kumar4](https://discuss.elastic.co/u/Sandeep_Kumar4)
#### Post date: [January 17, 2020, 10:33am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster-and-this-node-must-discover-master-eligible-nodes-elasticsearch/214185/3 "2020-01-17T10:33:48Z")

</div>

changed network\_mode: "bridge" to network\_mode: "host" all working fine

---

<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: [February 14, 2020, 10:33am UTC](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster-and-this-node-must-discover-master-eligible-nodes-elasticsearch/214185/4 "2020-02-14T10:33:50Z")

</div>

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