美文网首页
ElasticSearch学习系列文章-elasticsearc

ElasticSearch学习系列文章-elasticsearc

作者: 一枚智障者 | 来源:发表于2020-02-09 19:29 被阅读0次

自己在使用elasticSearch的安装配置过程中,出现了部分问题,自己在这里记录起来,同时方便自己后期的复习以及能够帮助其他的童鞋减少入坑。

1、root用户启动elasticsearch报错

在使用root用户启动elasticSearch时,不能成功启动,提示“can not run elasticsearch as root”,Elasticsearch为了安全考虑,不让使用root启动

解决办法:新建一个用户,用此用户进行相关的操作。

2、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535],当前用户的可创建文件描述的权限太低

解决办法:切换到root用户,修改 /etc/security/limits.conf,在最后追加如下内容

## elasticsearch代表启动elasticsearch的用户

elasticsearch hard nofile 65536

elasticsearch soft nofile 65536

3、max number of threads [3767] for user [xxxx] is too low, increase to at least [4096],当前用户的最大线程数不满足es的要求

解决办法:切换为root用户,修改/etc/security/limits.d/20-nproc.conf,在最后追加如下内容

* hard nproc 4096

4、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144], es用户拥有的内存权限太小,至少需要262144

解决办法:切换为root用户,修改/etc/sysctl.conf,在最后追加如下内容,并执行命令sysctl -p 使配置生效

vm.max_map_count=262144

相关文章

网友评论

      本文标题:ElasticSearch学习系列文章-elasticsearc

      本文链接:https://www.haomeiwen.com/subject/fvsnxhtx.html