Elasticsearch遇到的几个问题及解决办法

启动es遇到的问题:
 

ERROR: [5] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: memory locking requested for elasticsearch process but memory is not locked
[3]: max number of threads [1024] for user [wangxiang] is too low, increase to at least [4096]
[4]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[5]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

解决办法:
1.修改vi /etc/security/limits.conf文件,增加配置

*               soft    nofile          65536
*               hard    nofile          65536

2.  切换到root用户,编辑vi /etc/security/limits.conf配置文件,添加如下内容: 

* soft memlock unlimited 

* hard memlock unlimited 

备注:* 代表Linux所有用户名称

3. 最大线程个数太低。修改配置文件 vi /etc/security/limits.d/90-nproc.conf

*               soft    nproc           4096
*               hard    nproc           4096

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

vm.max_map_count=262144

执行命令sysctl -p生效

5. 在elasticsearch.yml中添加配置项

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

猜你喜欢

转载自blog.csdn.net/a857553315/article/details/85042480
今日推荐