問題出現環境,OS版本:CentOS-7-x86_64-Minimal-1708;ES版本:elasticsearch-6.2.2。java
一、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]jvm
每一個進程最大同時打開文件數過小,可經過下面2個命令查看當前數量elasticsearch
ulimit -Hn
ulimit -Sn
修改/etc/security/limits.conf文件,增長配置,用戶退出後從新登陸生效spa
* soft nofile 65536
* hard nofile 65536
二、max number of threads [3818] for user [es] is too low, increase to at least [4096]線程
問題同上,最大線程個數過低。修改配置文件/etc/security/limits.conf(和問題1是一個文件),增長配置code
* soft nproc 4096
* hard nproc 4096
可經過命令查看blog
ulimit -Hu
ulimit -Su
修改後的文件:進程
三、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]ip
修改/etc/sysctl.conf文件,增長配置vm.max_map_count=262144it
vi /etc/sysctl.conf
sysctl -p
執行命令sysctl -p生效
四、Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/elasticsearch/elasticsearch-6.2.2-1/config/jvm.options
elasticsearch用戶沒有該文件夾的權限,執行命令
chown -R es:es /usr/local/elasticsearch/