kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue

 

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(0x00000000e0000000, 536870912, 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 536870912 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /root/local/kafka/kafka_2.11-2.2.0/hs_err_pid2045.log

2.报错截图

kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue_第1张图片

3.发现是内存太小,所以我们修改配置文件的启动限制大小

3.1.  修改bin目录下的kafka-server-start.sh文件   修改初始堆大小:-Xms  设置小一些

 

kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue_第2张图片

修改为:

kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue_第3张图片

3.2.修改bin目录下的 zookeeper-server-start.sh,  修改初始堆大小:-Xms  设置小一些

 

kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue_第4张图片

修改为:

kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue_第5张图片

4.再次启动:发现启动正常

kafka启动内存报错There is insufficient memory for the Java Runtime Environment to continue_第6张图片

你可能感兴趣的:(JAVA,kafka)