Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch - Bootstrap checks failing

I'm trying to use the Flink 5.x Elasticsearch sink connector to insert data to ES 5.2.1 instance hosted on a tiny VM.

As this is a tiny VM in development mode, I cant get it to start up to accept TransportClient remote client connections on 9300 without failing the bootstrap checks.

[2017-02-17T09:02:48,581][INFO ][o.e.n.Node               ] [Z_fiBnl] starting ...
[2017-02-17T09:02:48,866][INFO ][o.e.t.TransportService   ] [Z_fiBnl] publish_address {xxxxxx:9300}, bound_addresses {127.0.0.1:9300}
[2017-02-17T09:02:48,878][INFO ][o.e.b.BootstrapChecks    ] [Z_fiBnl] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [xxx] is too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

I've played around with the below settings but just cant get it to startup(http clients on 9200 work fine)

transport.publish_host: 0.0.0.0
transport.bind_host: 0.0.0.0
http.host: "xxx"
http.host: 169.117.72.167
network.host: 0.0.0.0
network.publish_host: 0.0.0.0

Note that ES is running on a tiny VM just for dev purposes and I don't have access to change for ex. the file descriptor limits on this box.

like image 417
Pete Avatar asked Feb 17 '17 14:02

Pete


People also ask

What is bootstrap Memory_lock true?

The memory lock check verifies that if the bootstrap. memory_lock setting is enabled, that the JVM was successfully able to lock the heap. To pass the memory lock check, you might have to configure bootstrap. memory_lock .

What is network host in Elasticsearch Yml?

The network. host config is used to tell elasticsearch which IP in the server it will use to bind. Every service running in a server needs to bind to at least one IP, since servers can have multiple IPs, you can use 0.0. 0.0 to tell the service to bind to all the IPs available on the server.

What is bootstrap check?

These bootstrap checks inspect a variety of Elasticsearch and system settings and compare them to values that are safe for the operation of Elasticsearch. If Elasticsearch is in development mode, any bootstrap checks that fail appear as warnings in the Elasticsearch log.


2 Answers

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!!

like image 190
Farhad Farahi Avatar answered Oct 25 '22 05:10

Farhad Farahi


Try configuring your elasticsearch.yml file this way :

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

like image 19
tkarra Avatar answered Oct 25 '22 06:10

tkarra