A es node with docker dosen't got allocated


(Hulva Luva.H) #1

At first, i have to apologize for my poor english :joy:

That's what i want:

I have a es cluster with 3 nodes, and i want replace them with the node in docker container one by one and not shut them down. That's how i think:

  1. create a node with docker and let it join in the cluster
  2. wait allocation complete
  3. remove one of the old 3

The problem is : the new joined one haven't got allocated :joy:

old 3:

the docker one joined:

and i tried one not in docker, it got allocated immediately:

My configurations elasticsearch.yaml :

cluster.name: luva4test
node.name: luva4test-mnode-91
node.rack: luva4test-rack
path.data: /usr/share/elasticsearch/data
path.logs: /usr/share/elasticsearch/logs
bootstrap.memory_lock: true
network.host: 10.xx.xx.95
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.xx.xx.91", "10.xx.xx.95"]

The other two is almost the same.

in docker one elasticsearch.yaml:

cluster.name: luva4test
node.name: luva4test-mnode-95docker
node.rack: luva4test-rack
path.data: /usr/share/elasticsearch/data
path.logs: /usr/share/elasticsearch/logs
bootstrap.memory_lock: true
network.host: 10.xx.xx.95
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.xx.xx.91", "10.xx.xx.95"]

The docker container config docker-compose.yaml :

version: '2'

services:
  elasticsearch:
    image: elasticsearch:2.4.0
    container_name: elasticsearch
    restart: always
    network_mode: host
    volumes:
        - /data/luva/docker/docker4es/data/elasticsearch:/usr/share/elasticsearch/data
        - /data/luva/docker/docker4es/logs/elasticsearch:/usr/share/elasticsearch/logs
        - /data/luva/docker/docker4es/plugins:/usr/share/elasticsearch/plugins
        - /data/luva/docker/docker4es/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml

(system) #2