elasticsearch啟動錯誤解決
es啟動預設不能使用root使用者,所以需要新建立一個使用者來啟動。
啟動時可能出現的問題:
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [esuser1] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
1.修改最大檔案描述符數量為65536:
編輯檔案:/etc/security/limits.conf
新增:
* soft nofile 65536
* hard nofile 65536
2.修改使用者最大執行緒數為4096
編輯檔案:/etc/security/limits.d/90-nproc.conf
* soft nproc 1026
修改為:
* soft nproc 4096
3.修改最大虛擬記憶體區域為262144
修改檔案:/etc/sysctl.conf
新增
vm.max_map_count = 262144
4.在elasticsearch.yml檔案中的memory欄新增
bootstrap.memory_lock: false
bootstrap.system_call_filter: false