Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I disable the bootstrap checks in Elasticsearch 5.4?

I'm running Elasticsearch on a non-production RHEL6 server. I only have a regular user account with no root access. I'm in a very locked-down corporate environment so getting root will be time-consuming and I need a work-around.

When I start the process I get these errors:

max file descriptors [8192] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [salimfadhley] 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]

Is there a way to make ElasticSearch ignore this error condition and just start up.

I'm fully aware that ignoring errors is normally considered unwise, however on this occasion I just need to get ES up and running so that I can devote my attention to other aspects of this project: Getting the system limits raised will take more time than I currently have available.

like image 380
Salim Fadhley Avatar asked May 18 '17 15:05

Salim Fadhley


People also ask

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.

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 .


1 Answers

@ThomasDecaux is correct that you can technically disable bootstrap. But you can only disable bootstrap checks sometimes. Here is when you can disable bootstrap checks:

  • configured your elasticsearch.yml with discovery.type: single-node
  • or your N nodes are all using zen discovery on localhost

If you need to run N nodes on N machines as one cluster, then no you can not disable bootstrap checks.

When you configure your elasticsearch.yml to use an external interface and you don't have discovery.type: single-node then bootstrap checks can not be disabled. I tried.

I had a machine failing the bootstrap tests but I didn't have sudo permission to fix it. I tried to disable checks by passing the -Des.enforce.bootstrap.checks=false to the Java JVM options but the bootstrap checks were still enabled.

Here is a github issue from 2018 where the developers say you can't disable bootstrap checks https://github.com/elastic/elasticsearch/issues/31933 :

" There is no command line option for disabling bootstrap checks. The es.enforce.bootstrap.checks option is used to enable them when they are disabled due to Elasticsearch not detecting that it is being used in production (single node, only reachable through localhost or using single-node discovery). "

like image 109
Trevor Boyd Smith Avatar answered Oct 03 '22 06:10

Trevor Boyd Smith