解决 elasticsearch 启动错误 bootstrap checks failed

这篇具有很好参考价值的文章主要介绍了解决 elasticsearch 启动错误 bootstrap checks failed。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

解决 elasticsearch 启动错误 bootstrap checks failed

异常信息:

[2021-12-14T10:32:17,074][INFO ][o.e.b.BootstrapChecks    ] [node-10] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max number of threads [1024] for user [xzlawin] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/local/opt/elasticsearch-7.8.0/logs/my-application.log
[2021-12-14T10:32:17,106][INFO ][o.e.n.Node               ] [node-10] stopping ...
[2021-12-14T10:32:17,139][INFO ][o.e.n.Node               ] [node-10] stopped
[2021-12-14T10:32:17,139][INFO ][o.e.n.Node               ] [node-10] closing ...
[2021-12-14T10:32:17,160][INFO ][o.e.n.Node               ] [node-10] closed
[2021-12-14T10:32:17,162][INFO ][o.e.x.m.p.NativeController] [node-10] Native controller process has stopped - no new native processes can be started

分析原因:bootstrap 校验失败

解决方法:将当前用户的软硬限制调大

  • 修改配置文件,/etc/security/limits.conf
cp -a /etc/security/limits.conf /etc/security/limits.conf.bak
vi /etc/security/limits.conf
# 在文件末尾追加下面内容
xzlawin soft nofile 65536
xzlawin hard nofile 65536
  • 修改配置文件,/etc/security/limits.d/90-nproc.conf
cp -a /etc/security/limits.d/90-nproc.conf /etc/security/limits.d/90-nproc.conf.bak
vi /etc/security/limits.d/90-nproc.conf
# 在文件末尾追加下面内容
xzlawin soft nofile 65536
xzlawin hard nofile 65536
* soft nproc 4096
* hard nproc 4096
# 注意:* 表示Linux所有用户名称
  • 修改配置文件,/etc/sysctl.conf
cp -a /etc/sysctl.conf /etc/sysctl.conf.bak
vi /etc/sysctl.conf
# 在文件末尾追加下面内容
vm.max_map_count=655360
  • 重新加载
sysctl -p

文章来源地址https://www.toymoban.com/news/detail-519699.html

到了这里,关于解决 elasticsearch 启动错误 bootstrap checks failed的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包