1. 程式人生 > >Elasticsearch啟動報錯

Elasticsearch啟動報錯

least for 修改 pre rip 重新 生效 roo arch

報錯信息一:

ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解決方法:

# vim /etc/sysctl.conf

添加下面配置:

vm.max_map_count=655360

並執行命令:

# sysctl -p

報錯信息二:

ERROR: [1] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解決方法:

切換到root用戶

# ulimit -Hn  查看硬限制

# vim /etc/security/limits.conf 

#添加下面設置 hadoop是用戶

elsearch soft nofile 65536
elsearch hard nofile 65536

退出用戶重新登錄,使配置生效

重新 ulimit -Hn  查看硬限制 會發現數值有4096改成65535

# vim /etc/security/limits.d/90-nproc.conf 

找到如下內容:

soft nproc 1024

修改為

soft nproc 2048

Elasticsearch啟動報錯