elasticsearch启动时报错:error='Cannot allocate memory' (errno=12)

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启动时报错:error='Cannot allocate memory' (errno=12)_第1张图片
修改完后再次启动就启动成功

你可能感兴趣的:(异常解决)