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

I'm trying to install via podman compose in 3 machines

    version: "3"
    services:
      es01:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
        container_name: es01
        environment:
          - node.name=es01
          - transport.host=localhost
          - cluster.name=es-cluster
          - discovery.seed_hosts=54.169.94.194,52.77.224.28
          - cluster.initial_master_nodes=es01,es02,es03
          - "ES_JAVA_OPTS=-Xms3g -Xmx3g"
          - index.codec=best_compression
        ports:
          - 9200:9200
          - 9300:9300
        networks:
          - elastic
    networks:
      elastic:
        driver: bridge

and got error

{
    "type": "server",
    "timestamp": "2021-04-21T07:55:28,865Z",
    "level": "WARN",
    "component": "o.e.c.c.ClusterFormationFailureHelper",
    "cluster.name": "es-cluster",
    "node.name": "es01",
    "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [es01, es02, es03] to bootstrap a cluster: have discovered [{es01}{jqxZrV8YR_2aAN-xiXJRaQ}{AA0wOEY1SweSev8ikE2Hkw}{localhost}{127.0.0.1:9300}{cdfhilmrstw}{ml.machine_memory=4124807168, xpack.installed=true, transform.node=true, ml.max_open_jobs=20, ml.max_jvm_size=3221225472}]; discovery will continue using [54.169.94.194:9300, 52.77.224.28:9300] from hosts providers and [{es01}{jqxZrV8YR_2aAN-xiXJRaQ}{AA0wOEY1SweSev8ikE2Hkw}{localhost}{127.0.0.1:9300}{cdfhilmrstw}{ml.machine_memory=4124807168, xpack.installed=true, transform.node=true, ml.max_open_jobs=20, ml.max_jvm_size=3221225472}] from last-known cluster state; node term 0, last-accepted version 0 in term 0"
}

How do I fix it.

Make the below change and give it a try:

- cluster.initial_master_nodes=es01

Because it might look for es02 and es03 when they are yet to be deployed. Its part of bootstrapping where give only es01 initially for kick-starting the cluster.

Good luck!

Thank you for your reply, but I have no luck with es02. Wait until es01 looks fine and start es02.

version: "3"
services:
  es02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
    container_name: es02
    environment:
      - node.name=es02
      - transport.host=localhost
      - cluster.name=es-thaicom-cluster
      - discovery.seed_hosts=13.212.244.174,52.77.224.28
      - cluster.initial_master_nodes=es01
      - "ES_JAVA_OPTS=-Xms3g -Xmx3g"
      - index.codec=best_compression
      # - xpack.security.enabled=true
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - elastic
networks:
  elastic:
    driver: bridge

Got errors

{
    "type": "server",
    "timestamp": "2021-04-21T09:17:24,919Z",
    "level": "WARN",
    "component": "o.e.c.c.ClusterFormationFailureHelper",
    "cluster.name": "es-thaicom-cluster",
    "node.name": "es02",
    "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [es01] to bootstrap a cluster: have discovered [{es02}{JsDNP2XKTvSVogX1aqmkIg}{g9kMmvAqQZ-utWpRXJubYA}{localhost}{127.0.0.1:9300}{cdfhilmrstw}{ml.machine_memory=4124807168, xpack.installed=true, transform.node=true, ml.max_open_jobs=20, ml.max_jvm_size=3221225472}]; discovery will continue using [13.212.244.174:9300, 52.77.224.28:9300] from hosts providers and [{es02}{JsDNP2XKTvSVogX1aqmkIg}{g9kMmvAqQZ-utWpRXJubYA}{localhost}{127.0.0.1:9300}{cdfhilmrstw}{ml.machine_memory=4124807168, xpack.installed=true, transform.node=true, ml.max_open_jobs=20, ml.max_jvm_size=3221225472}] from last-known cluster state; node term 0, last-accepted version 0 in term 0"
}

I found solution in here.

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