ElasticSearch啟動失敗問題彙總和解決方法

chenfeng發表於2017-12-26
1.Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
由於elasticsearch5.0預設分配jvm空間大小為2g,修改jvm空間分配
vi elasticsearch/config/jvm.options  
#-Xms1g
#-Xmx1g
修改為
-Xms512m  
-Xmx512m



2.max number of threads [2048] for user [elasticsearch] is too low, increase to at least [4096]
修改 /etc/security/limits.d/90-nproc.conf 
*          soft    nproc     2048
修改為
*          soft    nproc     4096




3.ERROR: bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
修改/etc/sysctl.conf配置檔案,
vi /etc/sysctl.conf
修改如下行:
vm.max_map_count=262144
如果不存在則新增:
echo "vm.max_map_count=262144" >>/etc/sysctl.conf


4.max file descriptors [65535] for elasticsearch process likely too low, increase to at least [65536]
ulimit -n 65536
然後退出當前使用者,重新登入後生效

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2149328/,如需轉載,請註明出處,否則將追究法律責任。

相關文章