Elasticsearch - Bootstrap 检查失败

标签 elasticsearch

我正在尝试使用 Flink 5.x Elasticsearch 接收器连接器将数据插入微型 VM 上托管的 ES 5.2.1 实例。

因为这是一个处于开发模式的微型虚拟机,所以我无法让它启动以在 9300 上接受 TransportClient 远程客户端连接而不会使 Bootstrap 检查失败。

[2017-02-17T09:02:48,581][INFO ][o.e.n.Node               ] [Z_fiBnl] starting ...
[2017-02-17T09:02:48,866][INFO ][o.e.t.TransportService   ] [Z_fiBnl] publish_address {xxxxxx:9300}, bound_addresses {127.0.0.1:9300}
[2017-02-17T09:02:48,878][INFO ][o.e.b.BootstrapChecks    ] [Z_fiBnl] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [xxx] is too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

我试过以下设置,但就是无法启动(9200 上的 http 客户端工作正常)

transport.publish_host: 0.0.0.0
transport.bind_host: 0.0.0.0
http.host: "xxx"
http.host: 169.117.72.167
network.host: 0.0.0.0
network.publish_host: 0.0.0.0

请注意,ES 仅在用于开发目的的微型虚拟机上运行,​​我无权更改 ex。此框的文件描述符限制。

最佳答案

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

ulimit -n 65536 

或设置nofile65536/etc/security/limits.conf

max number of threads [1024] for user [xxx] is too low, increase to at least [2048]

ulimit -u 2048

或者设置nproc2048或以上 /etc/security/limits.conf在开始 elasticsearch 之前。

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

设置vm.max_map_count=262144/etc/sysctl.conf 然后做 sysctl -p

如果您希望在开发环境中运行 elasticsearch,尽管 Bootstrap 检查失败:

在您的 elasticsearch.yml 中设置以下内容

transport.host: 127.0.0.1
http.host: 0.0.0.0

请注意,您不能在开发模式下形成集群。 不要在生产环境中使用 Bootstrap 检查失败的 elasticsearch!

关于Elasticsearch - Bootstrap 检查失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42300463/

相关文章:

elasticsearch - 加载kibana 4的问题

elasticsearch - 带有 Elasticsearch 的 Laravel Scout 不起作用

elasticsearch - 将 elasticsearch 索引设置为只读是否有任何性能提升

java - 在 elasticsearch 响应中更改字段名称

python - python elasticsearch dsl搜索带有空白的字段

elasticsearch - ElasticSearch过滤请求

elasticsearch - 为什么es通过查询删除会删除更多记录

elasticsearch - NEST:如何处理包含单个值的数组字段(Newtonsoft Json 序列化错误)

json - curl 请求未将json放入索引

elasticsearch - 如何禁用 elasticsearch 中的自动索引创建?