elasticsearch启动时报错:
Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e5330000, 449642496, 0) failed; error=‘Cannot allocate memory’ (errno=12)
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 449642496 bytes for committing reserved memory.
An error report file with more information is saved as:
/opt/module/elasticsearch-5.2.2/hs_err_pid82267.log

没有足够的内存供Java运行时环境继续运行。
#vim config/jvm.options
原本为2g
由于我的虚拟机给的运行内存只有2g比较少,所以分给elasticsearch的只能修改小一点

修改完后再次启动就启动成功
本文详细记录了在启动Elasticsearch过程中遇到的内存分配错误,通过调整jvm.options文件中内存分配设置,成功解决了因虚拟机内存限制导致的问题。

413

被折叠的 条评论
为什么被折叠?



