无法创建kafka主题

时间:2017-03-20 16:29:33

标签: amazon-web-services apache-kafka apache-zookeeper

我正在尝试在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$)

1 个答案:

答案 0 :(得分:0)

kafka经纪人没有运行。 SSH进入Kafka Broker实例并检查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