1.安装kafka的过程出现两个问题
1)错误: 找不到或无法加载主类 kafka.Kafka
原因:
下载的是源码包,需要编译。可以下载Binary downloads:
2) ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/zookeeper.properti
原因:启动时候 在 kafka的 bin目录,通过 ./zookeeper-server-start.sh config/zookeeper.properties & 启动的,应该是在 kafak的目录,通过bin/zookeeper-server-start.sh config/zookeeper.properties & 来启动
3)ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 1 larger than available brokers: 0
需要启动broker:
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
时间: 2024-10-10 10:50:50