You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Jagbir Hooda <js...@hotmail.com> on 2014/01/17 03:36:57 UTC
Question about missing broker data in zookeeper
Hi,
I've a setup of three kafka servers (kafka_2.8.0-0.8.0) and three zookeeper servers (zookeeper1, zookeeper2, zookeeper3).
Everything works OK, but when I did a consumer test using nodejs package node-kafka it failed to retrieve any messages. When I looked more closely I found something interesting.
When I do a zookeeper query using
----------------------8<----------------------------
prompt> ./bin/zookeeper-shell.sh zookeeper2:2182
ls /
[controller, brokers, zookeeper, controller_epoch]
ls /brokers
[ids]
ls /brokers/ids
[3, 2, 1]
ls /brokers/ids/1
[]
----------------------8<----------------------------
there is no data for broker. As perĀ
https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeper there should be broker registration data here. (I get same results from other two zookeepers as well).
The node-kafka consumer test that I mentioned earlier expects to find broker hostname and other connection information here, but it seems to be missing.
I'll appreciate if anyone can suggest a solution.
Thanks,
jsh1234
RE: Question about missing broker data in zookeeper
Posted by Jagbir Hooda <js...@hotmail.com>.
Thanks for your help Guozhang. I can get the data.
----------------8<----------------
get /brokers/ids/3
{ "host":"mongodb3", "jmx_port":-1, "port":9093, "timestamp":"1389924263116", "version":1 }
cZxid = 0x10000000f
ctime = Thu Jan 16 18:04:23 PST 2014
mZxid = 0x10000000f
mtime = Thu Jan 16 18:04:23 PST 2014
pZxid = 0x10000000f
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x2439dee76b00001
dataLength = 91
numChildren = 0
----------------8<----------------
jsh1234
----------------------------------------
> Date: Thu, 16 Jan 2014 18:47:18 -0800
> Subject: Re: Question about missing broker data in zookeeper
> From: wangguoz@gmail.com
> To: users@kafka.apache.org
>
> To get the broker registration data you need
>
> get /brokers/ids/1 (ls /brokers/ids/1 will only retrieve its children,
> which is null)
>
> Guozhang
>
>
> On Thu, Jan 16, 2014 at 6:36 PM, Jagbir Hooda <js...@hotmail.com> wrote:
>
>> Hi,
>>
>> I've a setup of three kafka servers (kafka_2.8.0-0.8.0) and three
>> zookeeper servers (zookeeper1, zookeeper2, zookeeper3).
>>
>> Everything works OK, but when I did a consumer test using nodejs package
>> node-kafka it failed to retrieve any messages. When I looked more closely I
>> found something interesting.
>>
>> When I do a zookeeper query using
>>
>> ----------------------8<----------------------------
>> prompt> ./bin/zookeeper-shell.sh zookeeper2:2182
>>
>> ls /
>> [controller, brokers, zookeeper, controller_epoch]
>>
>> ls /brokers
>> [ids]
>>
>> ls /brokers/ids
>> [3, 2, 1]
>>
>> ls /brokers/ids/1
>> []
>> ----------------------8<----------------------------
>>
>> there is no data for broker. As per
>>
>> https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeperthere should be broker registration data here. (I get same results from
>> other two zookeepers as well).
>>
>> The node-kafka consumer test that I mentioned earlier expects to find
>> broker hostname and other connection information here, but it seems to be
>> missing.
>>
>> I'll appreciate if anyone can suggest a solution.
>>
>> Thanks,
>> jsh1234
>
>
>
>
> --
> -- Guozhang
Re: Question about missing broker data in zookeeper
Posted by Guozhang Wang <wa...@gmail.com>.
To get the broker registration data you need
get /brokers/ids/1 (ls /brokers/ids/1 will only retrieve its children,
which is null)
Guozhang
On Thu, Jan 16, 2014 at 6:36 PM, Jagbir Hooda <js...@hotmail.com> wrote:
> Hi,
>
> I've a setup of three kafka servers (kafka_2.8.0-0.8.0) and three
> zookeeper servers (zookeeper1, zookeeper2, zookeeper3).
>
> Everything works OK, but when I did a consumer test using nodejs package
> node-kafka it failed to retrieve any messages. When I looked more closely I
> found something interesting.
>
> When I do a zookeeper query using
>
> ----------------------8<----------------------------
> prompt> ./bin/zookeeper-shell.sh zookeeper2:2182
>
> ls /
> [controller, brokers, zookeeper, controller_epoch]
>
> ls /brokers
> [ids]
>
> ls /brokers/ids
> [3, 2, 1]
>
> ls /brokers/ids/1
> []
> ----------------------8<----------------------------
>
> there is no data for broker. As per
>
> https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeperthere should be broker registration data here. (I get same results from
> other two zookeepers as well).
>
> The node-kafka consumer test that I mentioned earlier expects to find
> broker hostname and other connection information here, but it seems to be
> missing.
>
> I'll appreciate if anyone can suggest a solution.
>
> Thanks,
> jsh1234
--
-- Guozhang