1. 程式人生 > >elasticsearch 安裝及踩坑

elasticsearch 安裝及踩坑

問題二:ERROR: bootstrap checks failed

max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]

解決:切換到root使用者,編輯limits.conf 新增類似如下內容

vi /etc/security/limits.conf 

新增如下內容:

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

問題三:max number of threads [1024] for user [lish] likely too low, increase to at least [2048]

解決:切換到root使用者,進入limits.d目錄下修改配置檔案。

vi /etc/security/limits.d/90-nproc.conf 

修改如下內容:

* soft nproc 1024

#修改為

* soft nproc 2048

問題四:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

解決:切換到root使用者修改配置sysctl.conf

vi /etc/sysctl.conf 

新增下面配置:

vm.max_map_count=655360

並執行命令:

sysctl -p

然後,重新啟動elasticsearch,即可啟動成功。

6   這裡使用者必須重新登陸,否則不生效