Elasticsearch 7.2 set up cluster ERROR: [2] bootstrap checks failed in docker

Hello!
I have tried convert Elasticsearch 7.2 standalone node to cluster in docker.
Error:

elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,791+0000", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks"  }
elasticsearch_1      | ERROR: [2] bootstrap checks failed
elasticsearch_1      | [1]: memory locking requested for elasticsearch process but memory is not locked
elasticsearch_1      | [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,803+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "stopping ..."  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,862+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "stopped"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,863+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "closing ..."  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,884+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "closed"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,887+0000", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "Native controller process has stopped - no new native processes can be started"  }
database_elasticsearch_1 exited with code 78

All log:

elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:24,672+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "version[7.2.0], pid[1], build[default/docker/508c38a/2019-06-20T15:54:18.811730Z], OS[Linux/3.16.0-6-amd64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/12.0.1/12.0.1+12]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:24,673+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "JVM home [/usr/share/elasticsearch/jdk]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:24,673+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-11156684954975862055, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -Des.cgroups.hierarchy.override=/, -Xmx16g, -Xms16g, -Dio.netty.allocator.type=pooled, -XX:MaxDirectMemorySize=8589934592, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker, -Des.bundled_jdk=true]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,793+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [aggs-matrix-stats]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,797+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [analysis-common]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,799+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [data-frame]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,799+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [ingest-common]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,800+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [ingest-geoip]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,800+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [ingest-user-agent]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,800+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [lang-expression]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,801+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [lang-mustache]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,801+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [lang-painless]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,802+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [mapper-extras]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,803+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [parent-join]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,803+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [percolator]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,804+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [rank-eval]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,805+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [reindex]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,805+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [repository-url]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,805+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [transport-netty4]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,806+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-ccr]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,806+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-core]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,806+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-deprecation]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,806+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-graph]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,807+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-ilm]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,807+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-logstash]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,807+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-ml]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,807+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-monitoring]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,808+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-rollup]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,808+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-security]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,808+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-sql]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,808+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "loaded module [x-pack-watcher]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:27,809+0000", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "no plugins loaded"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:34,060+0000", "level": "INFO", "component": "o.e.x.s.a.s.FileRolesStore", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:35,310+0000", "level": "INFO", "component": "o.e.x.m.p.l.CppLogMessageHandler", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "[controller/110] [Main.cc@110] controller (64 bit): Version 7.2.0 (Build 65aefcbfce449b) Copyright (c) 2019 Elasticsearch BV"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:35,942+0000", "level": "DEBUG", "component": "o.e.a.ActionModule", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "Using REST wrapper from plugin org.elasticsearch.xpack.security.Security"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:37,831+0000", "level": "INFO", "component": "o.e.d.DiscoveryModule", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "using discovery type [zen] and seed hosts providers [settings]"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,566+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "initialized"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,566+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "starting ..."  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,780+0000", "level": "INFO", "component": "o.e.t.TransportService", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "publish_address {172.19.0.4:9300}, bound_addresses {0.0.0.0:9300}"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,791+0000", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks"  }
elasticsearch_1      | ERROR: [2] bootstrap checks failed
elasticsearch_1      | [1]: memory locking requested for elasticsearch process but memory is not locked
elasticsearch_1      | [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,803+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "stopping ..."  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,862+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "stopped"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,863+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "closing ..."  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,884+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "closed"  }
elasticsearch_1      | {"type": "server", "timestamp": "2020-10-13T15:36:39,887+0000", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "elk-cluster", "node.name": "primary",  "message": "Native controller process has stopped - no new native processes can be started"  }
database_elasticsearch_1 exited with code 78

config:

cluster.name: "elk-cluster"
network.host: 0.0.0.0
node.name: primary



# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
#discovery.zen.minimum_master_nodes: 1


## Use single node discovery in order to disable production mode and avoid bootstrap checks
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
#
#discovery.type: single-node

# cluster config:




cluster.initial_master_nodes:
  - 172.21.21.70
  - 172.21.21.75




path.repo: ['/usr/share/elasticsearch/backup']

# disable swap
bootstrap.memory_lock: true

xpack.license.self_generated.type: basic

# Security (transport)
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: none
xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elasticsearch/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elasticsearch/elastic-certificates.p12

xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elasticsearch/elastic-certificates.p12
xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elasticsearch/elastic-certificates.p12
xpack.security.http.ssl.client_authentication: optional
xpack.security.http.ssl.verification_mode: none

I increase vm.max_map_count on host, not in docker

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