Kafka Centos安装遇到的问题
使用的时 kafka2.11.2.0.0 一定要jdk81、启动kafka内置的zookeeper时报错:ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)org.apache.zookeeper.server.quorum.QuorumPeerConf...
使用的时 kafka2.11.2.0.0 一定要jdk8
1、启动kafka内置的zookeeper时报错:
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 & 来启动
2、ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 1 larger than available brokers: 0
首先确保已启动:
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
若还不行,则按下面的方法:
复制kafka/config路径下的server.properties文件为:server-1.properties和server-2.properties
并修改这两个文件的配置项:
server-1.properties
broker.id=1
port=9093
log.dir=/tmp/kafka-logs-1
host.name=localhost
server-2.properties
broker.id=2
port=9094
log.dir=/tmp/kafka-logs-2
host.name=localhost
broker.id、port、log.dir在这三个配置项中都不一样。
再次启动可能报错:
kafka java.net.UnknownHostException: centos6.5: centos6.5: Name or service n
则需要把service.properties也要配置:broker.id,port,log.dir,host.name
更多推荐
所有评论(0)