docker启动elasticsearch报错

在这里插入图片描述

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c5330000, 986513408, 0) failed; error=‘Not enough space’ (errno=12)
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory
An error report file with more information is saved as:
logs/hs_err_pid1.log

解决方法参考这篇:
https://www.codeprj.com/blog/b0c4f21.html

最终问题的原因是启动es内存太大导致的,需要改小。

查找jvm.options目录:find / -name jvm.options

修改前:
-Xms4g
-Xmx4g

修改后:
-Xms512m
-Xmx512m

查看启动日志:docker logs -f es

nice!完美解决

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐