ElasticSearch启动失败常见问题

ElasticSearch启动失败常见问题


1. 报错【1】

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

解决办法
放开elasticsearch.yml中的cluster.initial_master_nodes注释,后面参数配置用到的节点名称

cluster.initial_master_nodes: [“node-1”]

2.报错【2】

java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed

错误原因
Centos6不支持SecComp,而ES默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
解决办法
在所有节点的elasticsearch.yml配置文件中加入:

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

3.报错【3】

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

每个进程最大同时打开文件数太小,可通过下面2个命令查看当前数量

ulimit -Hn
ulimit -Sn

修改/etc/security/limits.conf文件,增加配置,用户退出后重新登录生效

* soft nofile 65536
* hard nofile 65536

4.报错【4】

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

最大线程个数太低,可通过下面2个命令查看当前数量

ulimit -Hu
ulimit -Su

修改配置文件/etc/security/limits.conf,增加配置

* soft nproc 4096
* hard nproc 4096

修改配置文件/etc/security/limits.d/90-nproc.conf,修改配置,用户退出后重新登录生效

*          soft    nproc    4096
root       soft    nproc     unlimited

5.报错【5】

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

修改/etc/sysctl.conf文件,增加配置

vm.max_map_count=655360

执行以下命令生效

sysctl -p

6.报错【6】

Exception in thread “main” java.nio.file.AccessDeniedException: /opt/elasticsearch/elasticsearch-7.6.2/config/jvm.options

elasticsearch用户没有使用该文件夹的权限,执行命令

chown elasticsearch.elasticsearch /opt/elasticsearch -R

大家可根据自己定义的用户和路径更改命令

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值