linux启动elasticsearch,Elasticsearch启动报错及解决方法

Elasticsearch启动报错信息一:

ERROR: [2] bootstrap checks failed

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

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

解决方法:

# vim /etc/sysctl.conf

添加下面配置:

vm.max_map_count=655360

并执行命令:

# sysctl -p

报错信息二:

ERROR: [1] bootstrap checks failed

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

解决方法:

切换到root用户

# ulimit -Hn  查看硬限制

# vim /etc/security/limits.conf

##在末尾添加下面设置

* soft nofile 655350

* hard nofile 655350

退出用户重新登录,使配置生效

重新 ulimit -Hn  查看硬限制 会发现数值有4096改成65535

# vim /etc/security/limits.d/90-nproc.conf

找到如下内容:

soft nproc 1024

修改为

soft nproc 2048

报错信息三:

org.elasticsearch.bootstrap.StartupException: Java.lang.IllegalStateException: failed to obtain node locks, tried [[/data/elasticsearch/data/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

解决方法:

在开启多个elasticsearch 实例时,config/elasticsearch.yml文件中新增一个配置变量:

[elsearch@Elk_Server elasticsearch]$ vim config/elasticsearch.yml

node.max_local_storage_nodes: 256

报错信息四:

ERROR: [1] bootstrap checks failed

[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

[2019-03-01T16:20:49,025][INFO ][o.e.n.Node              ] [node-data1] stopping ...

[2019-03-01T16:20:49,081][INFO ][o.e.n.Node              ] [node-data1] stopped

[2019-03-01T16:20:49,081][INFO ][o.e.n.Node              ] [node-data1] closing ...

[2019-03-01T16:20:49,100][INFO ][o.e.n.Node              ] [node-data1] closed

解决方法:

CentOS6不支持SecComp,而ES5.2.0默认bootstrap.system_call_filter为true

禁用:在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:

bootstrap.memory_lock: false

bootstrap.system_call_filter: false

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值