我有一个带有以下ubuntu配置的流浪盒子。
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
以下是内存详细信息-
$ free -m
total used free shared buff/cache available
Mem: 488 43 92 1 351 414
我已经从here下载了kafka_2.12-1.1.1.tgz
文件。
然后,我尝试启动zookeeper服务器解压后,使用下面的命令。
$ sudo /home/vagrant/kafka/bin/zookeeper-server-start.sh /home/vagrant/kafka/config/zookeeper.properties
Java HotSpot(TM) 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:
# /home/vagrant/hs_err_pid5404.log
我已经提供了完整的错误日志here。
我发现流浪机总是有交换空间的问题。如何解决这个问题,并在流浪机上成功安装。
发布于 2018-09-18 08:31:51
您将需要显示您的Vagrant文件,但默认的VM内存空间不足以启动Zookeeper,更不用说Kafka以及Zookeeper了。
假设你的主机至少有4G内存,你可以看看我从Confluent派生的Vagrant + Ansible代码库,默认情况下,它会在不同的机器上启动Zookeeper和Kafka。
https://github.com/cricket007/cp-ansible/blob/addVagrant/vagrant/README.md
https://stackoverflow.com/questions/52375831
复制相似问题