Master not discovered or elected yet in docker envirement

Hello,

I'm in a strange problem as my Elasticsearch has produced this error:

{"type": "server", "timestamp": "2019-08-23T09:16:03,122+0000", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "docker-cluster", "node.name": "b3d98339aefc", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [opencti-dev-elasticsearch-01] to bootstrap a cluster: have discovered []; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305] from hosts providers and [{b3d98339aefc}{bH9-FdhtRkyzPEG8577SvQ}{CZV4x7TIS62xYjgpkCMmDA}{172.18.0.3}{172.18.0.3:9300}{ml.machine_memory=3086381056, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }

my docker compose file is :

version: '3'
  opencti-dev-elasticsearch-01:
    container_name: opencti-dev-elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0
    container_name: opencti-dev-elasticsearch-01
    environment:
      - cluster.initial_master_nodes=opencti-dev-elasticsearch-01
    restart: always
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    ports:
      - 9200:9200 

Is there any changes I can make in docker compose file to solve the issue ?

Here is the one I'm using:

---
version: '3'
services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.3.1
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200

HTH

Thank you, problem solved!.

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