Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch Error "bootstrap checks failed" (Binding non-loopback address)

Recently, after installation of Elasticsearch 7.3.2, I found out that the server is working fine when bound to the localhost or 127.0.0.1.

But I made it available for external use, that is on particular IP or 0.0.0.0, it raised me error and stopped the server:

bound or publishing to a non-loopback address, enforcing bootstrap checks [2019-09-19T18:21:43,962][ERROR][o.e.b.Bootstrap ] [MARFEEN] node validation exception [1] bootstrap checks failed

like image 861
Arfeen Avatar asked Dec 03 '22 18:12

Arfeen


2 Answers

Could not get any answer on this solution, most of them were related to max opened file limits. But it was solved when I enabled a config property discovery.seed_hosts in elasticsearch.yml file:

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["127.0.0.1"]

After enabling the above property, it worked fine on non-loopback host also.

like image 176
Arfeen Avatar answered Dec 28 '22 13:12

Arfeen


Most of the users don't know that setting network.host: 0.0.0.0 will cause the production bootstrap check and this is the cause of failure as mentioned in the below line of the error message.

[o.e.b.Bootstrap ] [MARFEEN] node validation exception [1] bootstrap checks failed

In order, to resolve the issue when you are running Elasticsearch in development mode or with a single node, please add below config in (Elasticsearch.config) to avoid above mentioned checks.

discovery.type: single-node --> In case of single node Elasticsearch cluser

es.enforce.bootstrap.checks=false. --> Explicitly disable these checks in Non-production env.
like image 31
Amit Avatar answered Dec 28 '22 13:12

Amit