Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Question on ES nodes discovery in docker-compose #65

Open
kikulikov opened this issue Apr 20, 2018 · 1 comment
Open

Question on ES nodes discovery in docker-compose #65

kikulikov opened this issue Apr 20, 2018 · 1 comment

Comments

@kikulikov
Copy link
Contributor

I'm trying to replicate a cluster setup with docker-compose. Please, see docker-compose file below.

version: '3'
services:
  elasticsearch-master:
    image: quay.io/pires/docker-elasticsearch:6.2.3_1
    container_name: elasticsearch-master
    privileged: true
    environment:
      - "HTTP_ENABLE=false"
      - "NODE_DATA=false"
      - "CLUSTER_NAME=elasticsearch"
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    networks:
      - elastic
  elasticsearch:
    image: quay.io/pires/docker-elasticsearch:6.2.3_1
    container_name: elasticsearch
    privileged: true
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - "NODE_MASTER=false"
      - "NODE_DATA=false"
      - "CLUSTER_NAME=elasticsearch"
      - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
      # - "discovery.zen.ping.unicast.hosts=[\"elasticsearch-master\"]"
    networks:
      - elastic
    depends_on:
      - elasticsearch-master
  elasticsearch-data1:
    image: quay.io/pires/docker-elasticsearch:6.2.3_1
    container_name: elasticsearch-data1
    privileged: true
    environment:
      - "NODE_MASTER=false"
      - "HTTP_ENABLE=false"
      - "CLUSTER_NAME=elasticsearch"
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "discovery.zen.ping.unicast.hosts=[\"elasticsearch-master\"]"
    depends_on:
      - elasticsearch-master
    networks:
      - elastic
  elasticsearch-data2:
    image: quay.io/pires/docker-elasticsearch:6.2.3_1
    container_name: elasticsearch-data2
    privileged: true
    environment:
      - "NODE_MASTER=false"
      - "HTTP_ENABLE=false"
      - "CLUSTER_NAME=elasticsearch"
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "discovery.zen.ping.unicast.hosts=[\"elasticsearch-master\"]"
    depends_on:
      - elasticsearch-master
    networks:
      - elastic

networks:
  elastic:
    driver: bridge

But nodes are never able to discover each other with messages like

elasticsearch           | [2018-04-20T22:13:56,503][WARN ][o.e.d.z.ZenDiscovery     ] [1ee60d4e-9387-47b7-bdcb-2a1ba408826f] not enough master nodes discovered during pinging (found [[]], but needed [1]), pinging again
elasticsearch-data1     | [2018-04-20T22:13:56,890][WARN ][o.e.d.z.ZenDiscovery     ] [bf93ab01-324d-4624-9d25-58b6611dcead] not enough master nodes discovered during pinging (found [[]], but needed [1]), pinging again

What am I possibly missing here? Thank you!

@pires
Copy link
Owner

pires commented Apr 22, 2018

I can't help at this point as I don't use docker-compose.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants