docker-compose-elasticsearch-kibana
docker-compose-elasticsearch-kibana copied to clipboard
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
As with all elastic search docker images I've been working with (on Arch Linux & Ubuntu) there needs to be a one time command issued to set the vm.max_map_count more hight. Running docker-compose up -d therefore should include a way to set these automatically or via a script run after first spinup of the cluster.
❯ docker -v
Docker version 18.09.3-ce, build 774a1f4eee
❯ docker-compose -v
docker-compose version 1.23.2, build unknown
@chris-aeviator This is setting recommended by Elastic.co which is outside Docker Compose and very well document here: https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docker.html
I understand that, what I was trying to express was that without the setting docker-compose up will result in an error
To whom it may help. Adding this manually or putting it in an Entrypoint:
sysctl -w vm.max_map_count=262144
For CENTOS 8 hosts I do the following before launching docker-compose:
Edit the /etc/sysctl.conf file by adding the following line (using vi or nano):
net.ipv4.ip_forward=1 vm.max_map_count=262144
Restart the network service:
systemctl restart NetworkManager.service
Validate the setting:
sysctl net.ipv4.ip_forward
You should get back the following response
net.ipv4.ip_forward = 1
grep vm.max_map_count /etc/sysctl.conf you should get back: vm.max_map_count=262144
This solved a problem with the second and third ES nodes not wanting to come up.
For windows user.
https://stackoverflow.com/questions/42111566/elasticsearch-in-windows-docker-image-vm-max-map-count/66985432#66985432