Arfeen
Arfeen

Reputation: 2623

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

Upvotes: 6

Views: 20664

Answers (3)

Amit
Amit

Reputation: 32376

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.

Upvotes: 4

penguinairlines
penguinairlines

Reputation: 1

Your answer is correct. This is set this way so that the health check forces your configuration to be presenting an external address before the node comes online.

The way you have configured it will work, so long as you do not require any special cluster conditions. At that point, you will need to set network.host: to an external IP/hostname.

Upvotes: 0

Arfeen
Arfeen

Reputation: 2623

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.

Upvotes: 15

Related Questions