Elasticsearch 6.3 绑定(bind)或发布到非环回地址,强制执行 Bootstrap 检查

标签 elasticsearch

为了在 Docker (--net=host) 中设置新的 ES 6.3 集群,我苦苦挣扎了好几天。错误如下:

[2018-06-20T16:31:45,766][INFO ][o.e.t.TransportService   ] [rpi-1] publish_address {192.168.0.101:9300}, bound_addresses {192.168.0.101:9300}
[2018-06-20T16:31:45,834][INFO ][o.e.b.BootstrapChecks    ] [rpi-1] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: JVM is using the client VM [Java HotSpot(TM) Client VM] but should be using a server VM for the best performance
[2018-06-20T16:31:45,886][INFO ][o.e.n.Node               ] [rpi-1] stopping ...
[2018-06-20T16:31:45,984][INFO ][o.e.n.Node               ] [rpi-1] stopped
[2018-06-20T16:31:45,985][INFO ][o.e.n.Node               ] [rpi-1] closing ...
[2018-06-20T16:31:46,025][INFO ][o.e.n.Node               ] [rpi-1] closed

如果我从下面的配置中删除 network.publish_host: 192.168.0.101,它将启动并尝试连接到另一个节点但会失败,因为它正在尝试使用 127.0.0.1 加入集群

我的配置:

#action.destructive_requires_name: true
xpack.ml.enabled: false
node.name:  c054915212b1
discovery.zen.ping.unicast.hosts: [192.168.0.108, 192.168.0.103, 192.168.0.104]
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
network.publish_host:  192.168.0.101
http.bind_host:  192.168.0.101
http.publish_host:  192.168.0.101
http.host:  192.168.0.101

在此版本之前,我在设置集群时从未遇到过问题。非常感谢您的帮助。

我也这样试过,结果一样;

action.destructive_requires_name: true
xpack.ml.enabled: false
node.name:  rpi-1
discovery.zen.ping.unicast.hosts: [192.168.0.108, 192.168.0.103, 192.168.0.104]
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
network.host:  192.168.0.101

最佳答案

每当您绑定(bind)到外部接口(interface)时,Elasticsearch 都会假定这是一个生产集群,并会进行一系列 Bootstrap 检查。也许你的内存没有被锁起来?尝试在 jvm.options 或使用命令行标志中为最小和最大 RAM 设置相同的值。

查看本指南:https://www.elastic.co/guide/en/elasticsearch/reference/master/bootstrap-checks.html

关于Elasticsearch 6.3 绑定(bind)或发布到非环回地址,强制执行 Bootstrap 检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50953263/

相关文章:

elasticsearch - 内部命中的聚合

scala - Spark RDD未从Elasticsearch获取所有源字段

elasticsearch - 使用 Nest 运行 Elasticsearch 原始查询

elasticsearch - 如何编写匹配查询或使用前缀查询

elasticsearch - 如何在 Elastic Search 中返回子文档的父 ID?

elasticsearch - 很难结合 bool 和 range 查询, Elasticsearch

elasticsearch - kubernetes 上的 Elastic Cloud 将密码设置为恒定值,并且不会在每次安装时更改

filter - Elasticsearch:错误的方面条件结果

amazon-web-services - ElasticSearch在pdf文档中搜索内容

angularjs - 无论我搜索什么,使用angularjs进行elasticsearch总是会命中数据库中的所有数据