问题描述
我最近在单节点CDH 5设置上设置了Kafka,目的是在移至实际集群之前在单个节点上使用Kafka.最初,我只是使用kafka服务器启动了zookeeper服务器,一切都很好.我可以看到Zookeeper在2181上运行,而Kafka在9092上运行.然后我创建了一个主题,并启动了消费者和生产者,消费者可以看到生产者正在发送的消息.
I recently setup Kafka on a single node CDH 5 setup with the aim of playing with it on a single node before moving to a real cluster. Initially, I just started the zookeeper server, with the kafka server and it was all fine. I could see that zookeeper was running on 2181 while Kafka was running on 9092. I then created a topic, and started the consumer and the producer and the consumer could see the messages the producer was sending.
带着幸福的表情,我搬到了动物园管理员日志的选项卡上,看到了:
With happiness on my face, I moved to the tab with zookeeper logs and saw this:
[2015-05-27 16:46:07,016] INFO Got user-level KeeperException when processing sessionid:0x14d97bf0a020002 type:create cxid:0x2 zxid:0x1f txntype:-1 reqpath:n/a Error Path:/consumers/test-consumer-group/ids Error:KeeperErrorCode = NoNode for /consumers/test-consumer-group/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-05-27 16:46:07,021] INFO Got user-level KeeperException when processing sessionid:0x14d97bf0a020002 type:create cxid:0x3 zxid:0x20 txntype:-1 reqpath:n/a Error Path:/consumers/test-consumer-group Error:KeeperErrorCode = NoNode for /consumers/test-consumer-group (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-05-27 16:46:07,306] INFO Got user-level KeeperException when processing sessionid:0x14d97bf0a020002 type:create cxid:0x19 zxid:0x24 txntype:-1 reqpath:n/a Error Path:/consumers/test-consumer-group/owners/test Error:KeeperErrorCode = NoNode for /consumers/test-consumer-group/owners/test (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-05-27 16:46:07,307] INFO Got user-level KeeperException when processing sessionid:0x14d97bf0a020002 type:create cxid:0x1a zxid:0x25 txntype:-1 reqpath:n/a Error Path:/consumers/test-consumer-group/owners Error:KeeperErrorCode = NoNode for /consumers/test-consumer-group/owners (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-05-27 16:47:06,961] INFO Got user-level KeeperException when processing sessionid:0x14d97bf0a020002 type:setData cxid:0x24 zxid:0x29 txntype:-1 reqpath:n/a Error Path:/consumers/test-consumer-group/offsets/test/0 Error:KeeperErrorCode = NoNode for /consumers/test-consumer-group/offsets/test/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-05-27 16:47:06,963] INFO Got user-level KeeperException when processing sessionid:0x14d97bf0a020002 type:create cxid:0x25 zxid:0x2a txntype:-1 reqpath:n/a Error Path:/consumers/test-consumer-group/offsets Error:KeeperErrorCode = NoNode for /consumers/test-consumer-group/offsets (org.apache.zookeeper.server.PrepRequestProcessor)
看似Zookeeper无法找到的节点...东西.但是,如果是这种情况,为什么我所有的命令都起作用?我能够创建一个主题,然后为该主题生成一些数据,而订阅该主题的消费者也可以获取数据?
It looks like zookeeper is not able to find a node for . . . stuff. But, if that's the case, why do all my commands work? I am able to create a topic, and then produce some data for it while the consumer subscribed to it gets the data too?
如果有帮助,我的zookeeper版本是3.4.6,而我的Kafka版本是0.8.2.1.哦,/tmp/zookeeper路径存在.
If it helps, my zookeeper version is 3.4.6 and my Kafka version is 0.8.2.1. And oh, the path /tmp/zookeeper exists.
推荐答案
我遇到了同样的问题
Exiting due to: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /consumers/test-group/offsets/packets/0.
我已解决问题,请确保您的Zookeeper和kafka经纪人正在运行,是的,您可以创建主题,生产者使用者将可以使用.要解决错误使用问题,必须让消费者拥有消费者组,并且该消费者组应订阅该主题
i solved issue,you make sure your zookeeper and kafka broker is running,yes you can create topic and producer consumer will work. to solve error use must have consumer with consumer group and that consumer group suscribed to that topic
在这种情况下,它将是消费者组 test-consumer-group
的消费者,并被订阅到主题 Test
In, your case it will be consumer with consumer group test-consumer-group
and suscribed to topic Test
这篇关于Zookeeper具有KeeperException,但Kafka能够创建主题并产生/消费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!