Elasticsearch 错误“引导程序检查失败”(绑定非环回地址)

Arf*_*een 4 elasticsearch

最近安装了Elasticsearch 7.3.2后,发现绑定localhost或者127.0.0.1后,服务器运行正常。

但是我使它可供外部使用,即在特定 IP 或 0.0.0.0 上,它引发了我的错误并停止了服务器:

绑定或发布到非环回地址,强制执行引导程序检查 [2019-09-19T18:21:43,962][ERROR][oebBootstrap] [MARFEEN] 节点验证异常 [1] 引导程序检查失败

Arf*_*een 10

无法得到有关此解决方案的任何答案,其中大部分与最大打开文件限制有关。但是当我discovery.seed_hosts在 elasticsearch.yml 文件中启用一个配置属性时它就解决了:

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["127.0.0.1"]
Run Code Online (Sandbox Code Playgroud)

启用上述属性后,它也可以在非环回主机上正常工作。