当前位置: 代码迷 >> 综合 >> kaka启动出现:Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000c00000, 1073,0)
  详细解决方案

kaka启动出现:Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000c00000, 1073,0)

热度:18   发布时间:2023-12-12 00:10:10.0

1、启动Kafka出现以下错误:

[root@hadoop01 kafka_2.13-2.6.0]# ./bin/kafka-server-start.sh config/server.properties 
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 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 1073741824 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/kafka_2.13-2.6.0/hs_err_pid21451.log

2、问题

启动时报错,大概意思是内存不足。

3、解决方案

# 修改前
export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
# 修改后
export KAFKA_HEAP_OPTS="-Xmx256M -Xms128M"

重新启动即可

在这里插入图片描述

  相关解决方案