Elasticsearch - Bootstrap 检查失败的最大虚拟内存区域错误
Elasticsearch - Bootstrap checks failing max virtual memory areas error
您好,我想在docker上安装elk,所以按照官方文档https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
所以当我想在 Docker 中启动 Elasticsearch 以获取为 elastic 用户生成的密码和用于注册 Kibana 的注册令牌时,通过执行以下命令:
docker run --name es01 --net elastic -p 9200:9200 -p 9300:9300 -it docker.elastic.co/elasticsearch/elasticsearch:8.1.2
我收到这个错误:
错误:[1] bootstrap 检查失败。在启动 Elasticsearch 之前,您必须解决以下 [1] 行中描述的要点。
bootstrap [1] 的 [1] 检查失败:最大虚拟内存区域 vm.max_map_count [65530] 太低,至少增加到 [262144]
错误:Elasticsearch 未正常退出 - 检查 /usr/share/Elasticsearch/logs/docker-cluster.log 处的日志
{"@timestamp":"2022-04-14T12:39:58.449Z", "log.level": "INFO", "message":"stopping ...", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2 ","log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-cluster"}
{"@timestamp":"2022-04-14T12:39:58.512Z", "log.level": "INFO", "message":"stopped", "ecs.version": "1.2. 0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2"," log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-集群"}
{"@timestamp":"2022-04-14T12:39:58.513Z", "log.level": "INFO", "message":"closing ...", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2 ","log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-cluster"}
{"@timestamp":"2022-04-14T12:39:58.531Z", "log.level": "INFO", "message":"closed", "ecs.version": "1.2. 0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2"," log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-集群"}
{"@timestamp":"2022-04-14T12:39:58.535Z", "log.level": "INFO", "message":"本机控制器进程已停止 - 无法启动新的本机进程" , "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"ml-cpp-log-tail-thread","log.logger":"org.Elasticsearch.xpack.ml.process.NativeController","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-簇"}
我通过运行以下命令解决了这个问题:
grep vm.max_map_count /etc/sysctl.conf vm.max_map_count=262144
您好,我想在docker上安装elk,所以按照官方文档https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
所以当我想在 Docker 中启动 Elasticsearch 以获取为 elastic 用户生成的密码和用于注册 Kibana 的注册令牌时,通过执行以下命令:
docker run --name es01 --net elastic -p 9200:9200 -p 9300:9300 -it docker.elastic.co/elasticsearch/elasticsearch:8.1.2
我收到这个错误:
错误:[1] bootstrap 检查失败。在启动 Elasticsearch 之前,您必须解决以下 [1] 行中描述的要点。 bootstrap [1] 的 [1] 检查失败:最大虚拟内存区域 vm.max_map_count [65530] 太低,至少增加到 [262144] 错误:Elasticsearch 未正常退出 - 检查 /usr/share/Elasticsearch/logs/docker-cluster.log 处的日志 {"@timestamp":"2022-04-14T12:39:58.449Z", "log.level": "INFO", "message":"stopping ...", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2 ","log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-cluster"} {"@timestamp":"2022-04-14T12:39:58.512Z", "log.level": "INFO", "message":"stopped", "ecs.version": "1.2. 0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2"," log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-集群"} {"@timestamp":"2022-04-14T12:39:58.513Z", "log.level": "INFO", "message":"closing ...", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2 ","log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-cluster"} {"@timestamp":"2022-04-14T12:39:58.531Z", "log.level": "INFO", "message":"closed", "ecs.version": "1.2. 0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"Thread-2"," log.logger":"org.Elasticsearch.node.Node","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-集群"} {"@timestamp":"2022-04-14T12:39:58.535Z", "log.level": "INFO", "message":"本机控制器进程已停止 - 无法启动新的本机进程" , "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"Elasticsearch.server","process.thread.name":"ml-cpp-log-tail-thread","log.logger":"org.Elasticsearch.xpack.ml.process.NativeController","Elasticsearch.node.name":"50af9edc5c7d","Elasticsearch.cluster.name":"docker-簇"}
我通过运行以下命令解决了这个问题:
grep vm.max_map_count /etc/sysctl.conf vm.max_map_count=262144