ElasticSearch启动失败问题汇总和解决方法

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15498/viewspace-2149328/

你可能感兴趣的:(大数据,操作系统,java)