Docker启动Elastic Search报错 ERROR: [1] bootstrap checks failed

1. 报错

ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
{"type": "server", "timestamp": "2020-01-04T10:45:51,354Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "ff57b48875b6", "message": "stopping ..." }
{"type": "server", "timestamp": "2020-01-04T10:45:51,460Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "ff57b48875b6", "message": "stopped" }
{"type": "server", "timestamp": "2020-01-04T10:45:51,461Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "ff57b48875b6", "message": "closing ..." }
{"type": "server", "timestamp": "2020-01-04T10:45:51,579Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "ff57b48875b6", "message": "closed" }
{"type": "server", "timestamp": "2020-01-04T10:45:51,583Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "docker-cluster", "node.name": "ff57b48875b6", "message": "Native controller process has stopped - no new native processes can be started" }

原因:如果是pull 官方镜像后直接启动,是没有配置Elastic Search的,所以需要添加一些配置信息。

注:博主这里配置过句柄数,如果没有配置过,可能也会报句柄数过小的错误。

2. 解决办法

找到elasticsearch.yml 文件:
注意:如果你有多个elastic search镜像或者容器,会查询到多个文件,这个需要一一尝试才能找到对应的配置文件,所以建议把所有的配置文件都添加上下面的内容。。。
在这里插入图片描述
在文件末尾添加:

bootstrap.system_call_filter: false
cluster.initial_master_nodes: ["node-1"]

在这里插入图片描述
重新启动测试:

docker start  容器名称/ID

在这里插入图片描述

完!

相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页