docker vm.max_map_count [65530] is too low

docker starts elasticsearch and crashes

docker logs elasticsearch

... ...
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log

... ...

Temporary modification

sysctl -w vm.max_map_count=262144

View Results:

sysctl -a|grep vm.max_map_count

display:

vm.max_map_count = 262144

Permanent modification:

Solution:

Add a line at the end of the /etc/sysctl.conf file

vm.max_map_count=262144

Guess you like

Origin blog.51cto.com/14922620/2575417