OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed;

Posted liuyupen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed;相关的知识,希望对你有一定的参考价值。

使用docker 安装kafka时启动失败

技术图片

查看报错日志

# docker logs --since 30m 71846a96e514
Excluding KAFKA_HOME from broker config
[Configuring] 'port' in '/opt/kafka/config/server.properties'
[Configuring] 'advertised.listeners' in '/opt/kafka/config/server.properties'
[Configuring] 'broker.id' in '/opt/kafka/config/server.properties'
Excluding KAFKA_VERSION from broker config
[Configuring] 'listeners' in '/opt/kafka/config/server.properties'
[Configuring] 'zookeeper.connect' in '/opt/kafka/config/server.properties'
[Configuring] 'log.dirs' in '/opt/kafka/config/server.properties'
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='Out of memory' (errno=12)

查看内存使用情况

# free -m

技术图片

创建swapfile

# dd  if=/dev/zero  of=swapfile  bs=1024  count=500000  
count=空间大小 of空间名字

将swapfile设置为swap空间

# mkswap swapfile

启用交换空间,这个操作有点类似于mount操作

# swapon  swapfile (删除交换空间 swapoff swapfile)

至此增加交换空间的操作结束了,可以使用free命令查看swap空间大小是否发生变化
技术图片
kafka 安装成功~
技术图片

参考博客:https://www.cnblogs.com/wang-yaz/p/9395005.html

以上是关于OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed;的主要内容,如果未能解决你的问题,请参考以下文章

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000001faf3e50000

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f6cb1055000, 16384, 0) failed; erro

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory failed error='Cannot allocate memory&#

记录:OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loade...idea debug启动报错解决方案

Java HotSpot(TM) 64-Bit Server VM warning: ignorin

Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file...