Elasticsearch - Bootstrap checks failing

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

ulimit -n 65536 

or set nofile to 65536 in /etc/security/limits.conf

max number of threads [1024] for user [xxx] is too low, increase to at least [2048]

ulimit -u 2048

Or set the nproc value to 2048 or above in /etc/security/limits.conf before starting elasticsearch.

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

set vm.max_map_count=262144 in /etc/sysctl.conf then do sysctl -p

If you want to run elasticsearch in development environment despite failing bootstrap checks:

Set the following in your elasticsearch.yml

transport.host: 127.0.0.1
http.host: 0.0.0.0

Please note you cant form a cluster in development mode. Dont use elasticsearch that is failing bootstrap checks in production!!


Try configuring your elasticsearch.yml file this way :

network.host: 0.0.0.0 http.port: 9200 transport.host: localhost transport.tcp.port: 9300


Issue is "max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]"

vm.max_map_count is very low, increasing its count will solve the issue

1. Linux

check with the vm.max_map_count setting in /etc/sysctl.conf:

grep vm.max_map_count /etc/sysctl.conf

OUTPUT : vm.max_map_count=262144

If the output is less than 262144, Apply new count as elasticsearch expectes, we have two options to add permanetly or temporoty fix.

add the varibale to /etc/sysctl.conf

vm.max_map_count=262144

OR

sysctl -w vm.max_map_count=262144

2. OSX with Docker for Mac

The vm.max_map_count setting must be set within the xhyve virtual machine:

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

Log in with root and no password. Then configure the sysctl setting as you would for Linux:

sysctl -w vm.max_map_count=262144

3. OSX with Docker Toolbox

The vm.max_map_count setting must be set via docker-machine:

docker-machine ssh

sudo sysctl -w vm.max_map_count=262144