卡夫卡主题未创建

时间:2019-09-21 18:59:53

标签: apache-spark apache-kafka cloudera cloudera-quickstart-vm

我正在使用以下link

在Quickstart Cloudera VM中安装kafka

但是当我在命令下运行时

kafka-topics --zookeeper quickstart.cloudera:2181 --create --topic test --partitions 1 --replication-factor 1

我遇到以下错误

19/09/21 11:28:36 INFO zookeeper.ClientCnxn: Session establishment complete on server quickstart.cloudera/10.0.2.15:2181, sessionid = 0x16d54d21037009d, negotiated timeout = 30000
19/09/21 11:28:38 INFO zookeeper.ZooKeeperClient: [ZooKeeperClient] Connected.
Error while executing topic command : Replication factor: 1 larger than available brokers: 0.
19/09/21 11:28:40 ERROR admin.TopicCommand$: org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 1 larger than available brokers: 0.

我尝试通过here解决此问题。但是在命令

下运行时
bin/zookeeper-server-start.sh config/zookeeper.properties

但出现错误。

19/09/21 11:54:42 ERROR quorum.QuorumPeerMain: Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/zookeeper.properties
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:131)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:106)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:79)
Caused by: java.lang.IllegalArgumentException: config/zookeeper.properties file is missing
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:115)
... 2 more
Invalid config, exiting abnormally

感谢任何潜在客户。

实际上,我想将kafka连接到spark。如果还有另一种方法可以做到。也可以。

0 个答案:

没有答案