解决 elasticsearch 启动错误 bootstrap checks failed

解决 elasticsearch 启动错误 bootstrap checks failed,第1张

解决 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

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5669291.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存