Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vm.max_map_count is too low

I am moving from elasticsearch 2.x to 5.x and facing this problem while starting up.

[2017-02-28T14:38:24,490][INFO ][o.e.b.BootstrapChecks    ] [node1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-02-28T14:38:24,494][ERROR][o.e.b.Bootstrap          ] [node1] node validation exception
bootstrap checks failed
max file descriptors [8192] for elasticsearch process is too low, increase to at least [65536]
max size virtual memory [52729364480] for user [elastic] is too low, increase to [unlimited]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

My yml looks as follows

node.name:  node1
network.host: _global_

I have downloaded the elasticsearch tarball and OS is SLES11Sp4

Elasticsearch bootstrap checks are defined here. But after playing around with /etc/security/limits.conf and /etc/sysctl.conf, still i cant bring it up.

In rpm installation, these things are supposedly taken care automatically.

like image 893
Atul Soman Avatar asked Dec 19 '22 09:12

Atul Soman


1 Answers

This is the setting which finally worked.

/etc/security/limits.conf

* hard memlock unlimited
* soft memlock unlimited
* hard nofile 65536
* soft nofile 65536
*  - as unlimited

/etc/sysctl.conf

fs.file-max = 2097152
vm.max_map_count = 262144
vm.swappiness = 1

elasticsearch.yml

cluster.name: atul-es-kerberos
node.name:  node1
network.host: _eth0:ipv4_
discovery.zen.ping.unicast.hosts: ["atul.labs.com"]
discovery.zen.minimum_master_nodes: 1
like image 93
Atul Soman Avatar answered Jan 17 '23 01:01

Atul Soman