无法创建kafka主题

wgx48brx  于 2021-06-07  发布在  Kafka
关注(0)|答案(1)|浏览(454)

我正在尝试创建一个关于ec2示例的kafka主题,我遵循这个文档https://aws.amazon.com/blogs/big-data/real-time-stream-processing-using-apache-spark-streaming-and-apache-kafka-on-aws/ 但我得到以下错误请帮助

ec2-user@ip-10-100-53-218 bin]$ ./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Error while executing topic command : replication factor: 1 larger than available brokers: 0
[2017-03-20 12:25:30,045] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 1 larger than available brokers: 0
 (kafka.admin.TopicCommand$)
brc7rcf0

brc7rcf01#

Kafka经纪人不在运行。ssh到kafka代理示例中,并检查kafka-server-start.sh是否正在运行。

ps -ef | grep kafka-server-start

如果不运行,启动它。

nohup /app/kafka/kafka_2.9.2-0.8.2.1/bin/kafka-server-start.sh /app/kafka/kafka_2.9.2-0.8.2.1/config/server.properties

相关问题