Tree node clustrering master_not_discovered_exception issue

i have tree node cluster of ES, the issue is:

  • when i stop one node the other nodes work fine and discover master node and everything works fine, but when is stop 2 node, the last one return master_not_discovered_exception error
    all node has same config:
  elasticsearch-01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
    container_name: elasticsearch-01
    restart: always
    environment:
      - node.name=elasticsearch-01
      - discovery.seed_hosts=elasticsearch-01,elasticsearch-02,elasticsearch-03
      - cluster.initial_master_nodes=elasticsearch-01,elasticsearch-02,elasticsearch-03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - /c/tpg/docker/volumes/elasticsearch/elasticsearch-01/usr/share/elasticsearch/data:/usr/share/elasticsearch/data
      #- /c/tpg/docker/volumes/elasticsearch/elasticsearch-01/etc/sysctl.conf:/etc/sysctl.conf
      - /c/tpg/docker/volumes/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml      
    ports:
      - 9200:9200
    networks:
      - elastic
elsticsearch-02:
     ...
elaasticsearch-03:
   ...
volumes:
  data01:
    driver: local
  data02:
    driver: local
  data03:
    driver: local

networks:
  elastic:
    driver: bridge

Elasticsearch.yml config:

discovery.zen.minimum_master_nodes: 1
cluster.name: elasticsearch-cluster
network.host: 0.0.0.0

A majority of master eligible nodes must be available in order to elect a master, so 2 out if 3 nodes need to be available for a functioning cluster.

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