1. 程式人生 > >ELK學習筆記之Elasticsearch啟動常見錯誤

ELK學習筆記之Elasticsearch啟動常見錯誤

 

問題出現的環境:

OS版本:CentOS-7-x86_64-Minimal-1708

ES版本:elasticsearch-6.2.2

 

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

  每個程序最大同時開啟檔案數太小,可通過下面2個命令檢視當前數量

ulimit -Hn
ulimit -Sn

 

修改/etc/security/limits.conf檔案,增加配置,使用者退出後重新登入生效

*               soft    nofile          65536
*               hard    nofile          65536

 

2. max number of threads [3818] for user [es] is too low, increase to at least [4096]

  問題同上,最大執行緒個數太低。修改配置檔案/etc/security/limits.conf,增加配置

       可通過命令檢視

ulimit -Hu
ulimit 
-Su

 

按照如下更改:

*               soft    nproc           4096
*               hard    nproc           4096

 

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

  修改/etc/sysctl.conf檔案,增加配置vm.max_map_count=262144

vi /etc/sysctl.conf
sysctl 
-p

      執行命令sysctl -p生效

 

4. 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/