Hi, i use es7.5.1 latest version. try to use docker-compose to build cluster service, plan to have three nodes and two master. and use kibana to manager it.
here is docker-compose.yml file
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.seed_hosts=es01,es02,es03
- cluster.initial_master_nodes=es01,es02,es03
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/data1/elasticsearch/es7/data
ports:
- 9201:9200
networks:
- elastic
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
container_name: es02
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.seed_hosts=es01,es02,es03
- cluster.initial_master_nodes=es01,es02,es03
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data02:/data1/elasticsearch/es7/data
ports:
- 9202:9200
networks:
- elastic
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
container_name: es03
environment:
- node.name=es03
- cluster.name=es-docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.seed_hosts=es01,es02,es03
- cluster.initial_master_nodes=es01,es02,es03
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data03:/data1/elasticsearch/es7/data
ports:
- 9203:9200
networks:
- elastic
kibana:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
container_name: kibana75
environment:
SERVER_NAME: kibana
ELASTICSEARCH_HOSTS: ["http://es01:9201", "http://es02:9202","http://es03:9203"]
ports:
- 5601:5601
networks:
- elastic
volumes:
data01:
driver: local
data02:
driver: local
data03:
driver: local
networks:
elastic:
driver: bridge
after start docker-compose get nodes working well;
curl http://localhost:9202/_cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
192.168.112.2 23 43 4 1.54 1.09 0.57 dilm - es01
192.168.112.4 40 43 2 1.54 1.09 0.57 dilm - es03
192.168.112.5 27 43 2 1.54 1.09 0.57 dilm * es02
but kibana can't connect to elasticsearch server, where is problem, can help on it? thanks.
get error info at below:
ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured