在虚拟机下安装elasticsearch-6.3.1,发现如下错误:
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c5330000, 4207738880, 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 4207738880 bytes for committing reserved memory.
# An error report file with more information is saved as:
# logs/hs_err_pid3238.log
于是打开hs_err_pid3238.log
发现如下:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 4207738880 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# 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:2657), pid=3238, tid=0x00007fd8c7a1f700
#
# JRE version: (8.0_171-b10) (build )
# Java VM: OpenJDK 64-Bit Server VM (25.171-b10 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
#
--------------- T H R E A D ---------------
Current thread (0x00007fd8c000c000): JavaThread "Unknown thread" [_thread_in_vm, id=3276, stack(0x00007fd8c791f000,0x00007fd8c7a20000)]
Stack: [0x00007fd8c791f000,0x00007fd8c7a20000], sp=0x00007fd8c7a1e310, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xa3fe6d]
V [libjvm.so+0x4dcb99]
V [libjvm.so+0x8afd73]
V [libjvm.so+0x8aff99]
V [libjvm.so+0x8a71ea]
V [libjvm.so+0xa3c918]
V [libjvm.so+0x5c9d89]
V [libjvm.so+0x4c102e]
V [libjvm.so+0x5caa99]
V [libjvm.so+0x5ba026]
V [libjvm.so+0xa0a921]
V [libjvm.so+0xa0b9d3]
V [libjvm.so+0x608915]
V [libjvm.so+0x9efce7]
V [libjvm.so+0x66e161] JNI_CreateJavaVM+0x71
C [libjli.so+0x3557]
C [libpthread.so.0+0x7aa1] start_thread+0xd1
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
Other Threads:
=>0x00007fd8c000c000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=3276, stack(0x00007fd8c791f000,0x00007fd8c7a20000)]
VM state:not at safepoint (not fully initialized)
VM Mutex/Monitor currently owned by a thread: None
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Classes redefined (0 events):
No events
Internal exceptions (0 events):
No events
Events (0 events):
No events
Dynamic libraries:
00400000-00401000 r-xp 00000000 fd:00 528960 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/jre/bin/java
00600000-00601000 rw-p 00000000 fd:00 528960 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/jre/bin/java
00cf7000-00d18000 rw-p 00000000 00:00 0 [heap]
6c0000000-6c5330000 rw-p 00000000 00:00 0
7fd8ac000000-7fd8ac021000 rw-p 00000000 00:00 0
7fd8ac021000-7fd8b0000000 ---p 00000000 00:00 0
7fd8b07ff000-7fd8b0829000 rw-p 00000000 00:00 0
7fd8b0829000-7fd8b0fff000 ---p 00000000 00:00 0
7fd8b0fff000-7fd8b1000000 rw-p 00000000 00:00 0
7fd8b1000000-7fd8b1270000 rwxp 00000000 00:00 0
7fd8b1270000-7fd8c0000000 ---p 00000000 00:00 0
7fd8c0000000-7fd8c0036000 rw-p 00000000 00:00 0
7fd8c0036000-7fd8c4000000 ---p 00000000 00:00 0
7fd8c453a000-7fd8c463b000 rw-p 00000000 00:00 0
7fd8c463b000-7fd8c463c000 ---p 00000000 00:00 0
7fd8c463c000-7fd8c4746000 rw-p 00000000 00:00 0
7fd8c4746000-7fd8c4afc000 ---p 00000000 00:00 0
7fd8c4afc000-7fd8c4b04000 r-xp 00000000 fd:00 529004 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/jre/lib/amd64/libzip.so
7fd8c4b04000-7fd8c4d03000 ---p 00008000 fd:00 529004 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/jre/lib/amd64/libzip.so
7fd8c4d03000-7fd8c4d04000 rw-p 00007000 fd:00 529004 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/jre/lib/amd64/libzip.so
7fd8c4d04000-7fd8c4d11000 r-xp 00000000 fd:00 130849 /lib64/libnss_files-2.12.so
7fd8c4d11000-7fd8c4f10000 ---p 0000d000 fd:00 130849 /lib64/libnss_files-2.12.so
7fd8c4f10000-7fd8c4f11000 r--p 0000c000 fd:00 130849 /lib64/libnss_files-2.12.so
7fd8c4f11000-7fd8c4f12000 rw-p 0000d000 fd:00 130849 /lib64/libnss_files-2.12.so
7fd8c4f12000-7fd8c4f3d000 r-xp 00000000 fd:00