阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Elasticsearch启动报错及解决方法

158次阅读
没有评论

共计 1706 个字符,预计需要花费 5 分钟才能阅读完成。

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

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-21发表,共计1706字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中