# Bypassing failing bootstrap checks

**URL:** <https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777>\
**Category:** Elasticsearch\
**Created:** [October 30, 2017, 4:12pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777 "2017-10-30T16:12:28Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 4:12pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/1 "2017-10-30T16:12:28Z")

</div>

I am trying to run 3 elasticsearch masters on a single node cluster but am having issues regarding the virtual memory setting. Everything seems to be running fine locally if I create the cluster/masters after first using sysctl to increase the virtual memory but the issue is that in production we do not run in privileged mode/allow modification to the virtual memory so I cannot add the sysctl procedure to create my elasticsearch cluster. I tried to get the cluster to start up and run locally without the sysctl beforehand and got the following message:

```
[2017-10-30T15:46:12,338][INFO][o.e.b.BootstrapChecks] [es-0] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

```

Although it isn't recommended, I also tried by disabling the bootstrap checks by adding the `discovery.type: single-node` config to my elasticsearch.yml file. When I do this my masters spin up instead of crashing like before. But accessing `/_cluster/health?pretty` shows a red status:

```
{
  "cluster_name" : "elasticsearch-logs",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : "NaN"
}

```

 ![00 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/e/deecbe4084c5f9748c8149512484bd0d374b1d76.png)

Is there any other way available to run a cluster with 3 masters without modifying virtual memory? Thanks!

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 30, 2017, 4:18pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/2 "2017-10-30T16:18:53Z")

</div>

> [@akpt](#):
>
> I am trying to run 3 elasticsearch masters on a single node cluster

Each master is a node. I am not sure I understand how can you run 3 master nodes on single node cluster? Would it be at least a 3 node cluster? Perhaps you mean that 3 master nodes on a single machines? But then I am not quite sure what you are trying to achieve by doing that.

---

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 4:23pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/3 "2017-10-30T16:23:01Z")

</div>

Sorry I had my terminology mixed up so I guess thats the reason the single node doesn't work. Yeah I want 3 master nodes on a single machine. I'm trying to combine the functionalities so that the 3 nodes are master/client/data. Here is the config for all 3:

```
elasticsearch.yml: |
    cluster.name: elasticsearch-logs
    node.name: ${HOSTNAME}
    node.master: true
    node.data: true
    network.host: _site_
    transport.tcp.port: 9300
    http.port: 9200
    http.enabled: true
    http.cors.enabled: true
    bootstrap.memory_lock: false
    xpack.security.enabled: false
    xpack.monitoring.enabled: false
    discovery.type: single-node
    discovery.zen.minimum_master_nodes: 2
    discovery.zen.ping_timeout: 10s
    discovery.zen.ping.unicast.hosts: elasticsearch-discovery

```

If it makes any difference, I'm trying to get the cluster running in a kubernetes cluster. So locally I am using a single node minikube cluster.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 30, 2017, 4:26pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/4 "2017-10-30T16:26:42Z")

</div>

> [@akpt](#):
>
> I'm trying to combine the functionalities so that the 3 nodes are master/client/data.

That is default. All nodes perform all these 3 functions by default.

But why do you want to run 3 nodes on the same machine?

---

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 4:27pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/5 "2017-10-30T16:27:09Z")

</div>

Yeah that is what I'm trying to do

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 30, 2017, 4:27pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/6 "2017-10-30T16:27:37Z")

</div>

Why?

---

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 4:35pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/7 "2017-10-30T16:35:54Z")

</div>

Locally I can only test/try to set up elasticsearch with minikube which is a single node cluster. So I can't split the nodes into different machines

I tried with only one elasticsearch node using the same config settings and still get the red status

```
[2017-10-30T16:24:24,883][INFO][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/47] [Main.cc@128] controller (64 bit): Version 5.6.3 (Build 5bf431d29b5bff) Copyright (c) 2017 Elasticsearch BV
[2017-10-30T16:24:24,928][INFO][o.e.d.DiscoveryModule] [es-0] using discovery type [single-node]
[2017-10-30T16:24:26,904][INFO][o.e.n.Node] [es-0] initialized
[2017-10-30T16:24:26,904][INFO][o.e.n.Node] [es-0] starting ...
[2017-10-30T16:24:27,424][INFO][o.e.t.TransportService] [es-0] publish_address {172.17.0.4:9300}, bound_addresses {172.17.0.4:9300}
[2017-10-30T16:24:27,495][WARN][o.e.b.BootstrapChecks] [es-0] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2017-10-30T16:24:27,583][INFO][o.e.c.s.ClusterService] [es-0] new_master {es-0}{aoQp8O2QRMOH_sjS8iBstg}{oL2QdhLdTgmhdGedpTbN7w}{172.17.0.4}{172.17.0.4:9300}{ml.max_open_jobs=10, ml.enabled=true}, reason: single-node-start-initial-join[{es-0}{aoQp8O2QRMOH_sjS8iBstg}{oL2QdhLdTgmhdGedpTbN7w}{172.17.0.4}{172.17.0.4:9300}{ml.max_open_jobs=10, ml.enabled=true}]
[2017-10-30T16:24:27,626][INFO][o.e.h.n.Netty4HttpServerTransport] [es-0] publish_address {172.17.0.4:9200}, bound_addresses {172.17.0.4:9200}
[2017-10-30T16:24:27,626][INFO][o.e.n.Node] [es-0] started

```

 ![50 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e9393f3974b3bfb76f70b1b8fcf916ae0bcdbfc.png)

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 30, 2017, 4:57pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/8 "2017-10-30T16:57:10Z")

</div>

I still don't understand why you want to run 3 nodes on the same machine, but if this is for testing, you can set transport [interface to localhost](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/bootstrap-checks.html#_development_vs_production_mode) and switch back to zen discovery.

---

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 5:06pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/9 "2017-10-30T17:06:49Z")

</div>

Thanks! Would that be the `transport.host: localhost` config? Minikube is a vm so would I set the vm IP instead? Also what would change if I wanted to run just 1 node locally in my vm without modifying virtual memory.

EDIT: I was able to get it running without modifying memory by using a single node

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 30, 2017, 5:40pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/10 "2017-10-30T17:40:17Z")

</div>

> [@akpt](#):
>
> Would that be the transport.host: localhost config?

Yes. You can disable bootstrap checks by running a single node cluster using single node discovery or by running several nodes using only `localhost` communication on the transport layer. In both cases, the cluster would be confined to a single machine.

I would also like to note that satisfying bootstraps checks is crucial for running elasticsearch in production. So, please check this [blog post](https://www.elastic.co/blog/bootstrap_checks_annoying_instead_of_devastating) before trying to disable them.

---

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 6:47pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/11 "2017-10-30T18:47:06Z")

</div>

So in production if I was using 3 nodes in different machines, what could I do so that I don't have to modify the virtual memory?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 30, 2017, 8:42pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/12 "2017-10-30T20:42:01Z")

</div>

> [@akpt](#):
>
> So in production if I was using 3 nodes in different machines, what could I do so that I don't have to modify the virtual memory?

In production you need to fix all bootstrap check issues.

---

<div class="post-metadata">

**Author:** ![akpt](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@akpt](https://discuss.elastic.co/u/akpt)\
**Post date:** [October 30, 2017, 8:52pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/13 "2017-10-30T20:52:44Z")

</div>

Alright, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 27, 2017, 8:52pm UTC](https://discuss.elastic.co/t/bypassing-failing-bootstrap-checks/105777/14 "2017-11-27T20:52:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
