linux环境下启动Elasticsearch报错:There is insufficient memory for the Java Runtime Environment to continue.

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2749), pid=26180, tid=0x00007ff85a826700
#
# JRE version:  (8.0_211-b12) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.211-b12 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

 

上述是错误日志,就是我服务器的配置内存不够,es默认配置2g内存,所以报错了。那么我们要修改一下内存配置,适合我们服务器。

打开es的安装目录 /config/jvm.options   将其内存设置修改为对应复合的,我这里就修改为256了

linux环境下启动Elasticsearch报错:There is insufficient memory for the Java Runtime Environment to continue._第1张图片

修改如下:

linux环境下启动Elasticsearch报错:There is insufficient memory for the Java Runtime Environment to continue._第2张图片

 

 

 

启动成功:

linux环境下启动Elasticsearch报错:There is insufficient memory for the Java Runtime Environment to continue._第3张图片

你可能感兴趣的:(elasticsearch)