下载地址
https://github.com/yahoo/CMAK
直接解压
unzip cmak-3.0.0.5.zip
修改配置文件
cmak.zkhosts=“zk集群”
启动报错
WARN] o.a.k.c.NetworkClient - [Consumer clientId=consumer-KMOffsetCache-localhost.localdomain-2, groupId=KMOffsetCache-localhost.localdomain] Connection to node -1 (localhost/127.0.0.1:9092) could not be established、Broker may not be available.
修改 kafka配置文件
cat server.properties
添加
listeners=PLAINTEXT://0.0.0.0:9092
advertised.listeners=PLAINTEXT://ip:9092
启动继续报错
[ERROR] k.m.a.c.BrokerViewCacheActor - Failed to get broker metrics for BrokerIdentity(1,ip,9988,false,true,Map(PLAINTEXT -> 9092))
添加kafka两个启动脚本启动脚本配置
vi kafka-server-start.sh
export JMX_PORT=9988
vi kafka-run-class.sh
搜索$KAFKA_JMX_OPTS
增加“-Djava.rmi.server.hostname=ip”
启动完成