Hi!
Please find that we are able to set up a single elastic search server and kibana suing docker-compose. But when we try to set up a cluster using the following we face issues while starting elastic search.
The elasticsearch1 server exit with exit code 137 which is soon followed by elasticsearch2 and then kibana. Please see docker-compose.yml below.
Any ideas / suggestion?
Regards,
Abhishek
Docker-compose.yml
version: '2'
services:
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- xpack.security.enabled=false
- http.cors.enabled=true
- http.cors.allow-origin=http://local.test.xxxxx.com:4200
- http.cors.allow-headers=Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With
- http.cors.allow-credentials=true
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
elasticsearch2:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- cluster.name=docker-cluster
- xpack.security.enabled=false
- http.cors.enabled=true
- http.cors.allow-origin=http://local.test.xxxxx.com:4200
- http.cors.allow-headers=Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With
- http.cors.allow-credentials=true
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch1"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 1g
cap_add:
- IPC_LOCK
volumes:
- esdata2:/usr/share/elasticsearch/data
ports:
- 9201:9200
links:
- "elasticsearch1:elastic-url"
networks:
- esnet
kibana:
image: docker.elastic.co/kibana/kibana:5.4.0
container_name: kibana
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
- "ELASTICSEARCH_USERNAME=elastic"
- "ELASTICSEARCH_PASSWORD=changeme"
- "ELASTICSEARCH_URL=http://elasticsearch1:9200"
ports:
- 5601:5601
links:
- "elasticsearch1:elastic-url"
networks:
- esnet
volumes:
esdata1:
driver: local
esdata2:
driver: local
networks:
esnet: