Reputation: 3099
I tried to use official Kibana and ElasticSearch images but they just exit with error messages. And after a few seconds after launch the state of the containers looks like this:
Name State
------------------------------
elasticsearch Exit 1
elasticsearch1 Exit 78
mongotest_kafka_1 Up
mongotest_kibana_1 Exit 1
The error message for one of the images:
elasticsearch1 | ERROR: [1] bootstrap checks failed
elasticsearch1 | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch1 | [2018-06-04T09:37:17,274][INFO ][o.e.n.Node ] [L0Tp7dx] stopping ...
elasticsearch1 | [2018-06-04T09:37:17,289][INFO ][o.e.n.Node ] [L0Tp7dx] stopped
elasticsearch1 | [2018-06-04T09:37:17,289][INFO ][o.e.n.Node ] [L0Tp7dx] closing ...
elasticsearch1 | [2018-06-04T09:37:17,296][INFO ][o.e.n.Node ] [L0Tp7dx] closed
elasticsearch1 | [2018-06-04T09:37:17,298][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
I am not sure whether some configurations in my docker-compose.yml are wrong:
version: '3.3'
services:
kafka:
image: spotify/kafka
ports:
- "9092:9092"
environment:
- ADVERTISED_HOST=localhost
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata2:/usr/share/elasticsearch/data
networks:
- esnet
kibana:
image: docker.elastic.co/kibana/kibana:6.2.4
environment:
SERVER_NAME: kibana
SERVER_NAME: "0"
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_USERNAME: elastic
ELASTICSEARCH_PASSWORD: changeme
XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED: "true"
networks:
- esnet
volumes:
esdata1:
driver: local
esdata2:
driver: local
networks:
esnet:
Upvotes: 0
Views: 745
Reputation: 263489
This needs to be configured on the docker host (the elastic stack has some requirements above default Linux host installs). Elastic has documentation on this process, including the virtual memory settings. For this specific error, you can run the following:
sysctl -w vm.max_map_count=262144
You'll want to configure this in /etc/sysctl.conf so the setting survives a reboot.
Upvotes: 2