I am trying to test the elastic docker. I want to create 2 node cluster (One master and the other replica). However, I am unable to create the replica node. Replica node throws an exception saying unable to connect master.
Can you help me on this. . Docker-Compose file is as follow:
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.4
container_name: elasticsearch
environment:
- cluster.name=metripping
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- network.host=0.0.0.0
- discovery.zen.minimum_master_nodes=1
- http.compression=true
- node.data=true
- discovery.zen.ping.unicast.hosts=172.1.1.1:9200,172.1.1.2:9200
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- /home/ubuntu/es/data:/usr/share/elasticsearch/data
- /home/ubuntu/es/logs:/usr/share/elasticsearch/logs
ports:
- 9200:9200
- 9300:9300
- 9000-9999:9000-9999
networks:
- esnet
networks:
esnet:
driver: bridge