0
点赞
收藏
分享

微信扫一扫

关于启动ElasticSearch疯狂失败这件事

SPEIKE 2022-04-04 阅读 56

使用背景浅浅介绍:nojdk版的es 7.4.2
首先在刚刚修改完配置文件后,切换到es用户后第一次启动(es不让root用户启动)
出现第一个问题:
这里可以看出是配置文件哪里出了问题

其实是格式出现问题
解决方法:在每个没有被注释掉的配置行的头需要一个空格,冒号后需要一个空格。

第二次启动
再次出现问题

解决方法:

  1. [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
    修改 etc/security/limits.conf
    追加
 es  soft nofile 65536
 es  hard nofile 65536
 此处的es是启动es使用的用户名
 需要切换用户才能刷新到
 验证修改成功的方法:
 $ ulimit -Sn
 $ ulimit -Hn
  1. [2]: max number of threads [3818] for user [es] is too low, increase to at least [4096]
    修改/etc/security/limits.d/90-nproc.conf
    /* soft nproc 3818
    修改为
    /* soft nproc 4096
  2. [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    修改/etc/sysctl.conf
    追加
vm.max_map_count=262144
  1. [4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
    原因:
    这是在因为Centos6不支持SecComp,而ES5.2.0默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
    解决:
    在es的配置文件中配置bootstrap.system_call_filter为false,注意要在Memory下面:
bootstrap.memory_lock: false 
bootstrap.system_call_filter: false

再次启动,就启动成功了!

举报

相关推荐

0 条评论