You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Yifan Ying <na...@gmail.com> on 2016/01/26 02:03:58 UTC

Tool to get consumer offset

Hi All,

For Kafka 0.8.2, I was using kafka-consumer-offset-checker.sh to get a
consumer group's offset . Now I am testing against Kafka 0.9 , but the same
tool always gave me


Exiting due to: org.apache.zookeeper.KeeperException$NoNodeException:
KeeperErrorCode = NoNode for /consumers/


I saw "Committed offset 21 for partition ..." from debug logs and the
consumer doesn't re-consume messages after next time the app starts. That
means the Kafka broker has the offset.

Then I tried

./kafka-consumer-groups.sh --zookeeper localhost:2181 --list

but still not able to get any consumer groups from the list. Does anyone
know how to get consumer offset with Kafka 0.9?


Thanks.


-- 
Yifan

Re: Tool to get consumer offset

Posted by Yifan Ying <na...@gmail.com>.
That works, thanks.

Yifan

On Mon, Jan 25, 2016 at 7:27 PM, Guozhang Wang <wa...@gmail.com> wrote:

> I forgot to mention you need to add "--new-consumer" as well.
>
> Guozhang
>
> On Mon, Jan 25, 2016 at 7:11 PM, Yifan Ying <na...@gmail.com> wrote:
>
> > Thanks for reply, Guozhang. I got 'Missing required argument
> "[zookeeper]"'
> > after running that.
> >
> >
> > Yifan
> >
> > On Mon, Jan 25, 2016 at 6:05 PM, Guozhang Wang <wa...@gmail.com>
> wrote:
> >
> > > Yifan,
> > >
> > > Offset checker has been deprecated in 0.9.0 (search for
> > > "kafka-consumer-groups.sh"):
> > >
> > > http://kafka.apache.org/documentation.html#upgrade
> > >
> > > If you are using the new consumer, then its metadata is not registered
> in
> > > ZK, so you should use the --bootstrap-server option instead of
> > --zookeeper:
> > >
> > > ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
> > >
> > > Guozhang
> > >
> > > On Mon, Jan 25, 2016 at 5:03 PM, Yifan Ying <na...@gmail.com>
> wrote:
> > >
> > > > Hi All,
> > > >
> > > > For Kafka 0.8.2, I was using kafka-consumer-offset-checker.sh to get
> a
> > > > consumer group's offset . Now I am testing against Kafka 0.9 , but
> the
> > > same
> > > > tool always gave me
> > > >
> > > >
> > > > Exiting due to: org.apache.zookeeper.KeeperException$NoNodeException:
> > > > KeeperErrorCode = NoNode for /consumers/
> > > >
> > > >
> > > > I saw "Committed offset 21 for partition ..." from debug logs and the
> > > > consumer doesn't re-consume messages after next time the app starts.
> > That
> > > > means the Kafka broker has the offset.
> > > >
> > > > Then I tried
> > > >
> > > > ./kafka-consumer-groups.sh --zookeeper localhost:2181 --list
> > > >
> > > > but still not able to get any consumer groups from the list. Does
> > anyone
> > > > know how to get consumer offset with Kafka 0.9?
> > > >
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > --
> > > > Yifan
> > > >
> > >
> > >
> > >
> > > --
> > > -- Guozhang
> > >
> >
> >
> >
> > --
> > Yifan
> >
>
>
>
> --
> -- Guozhang
>



-- 
Yifan

Re: Tool to get consumer offset

Posted by Guozhang Wang <wa...@gmail.com>.
I forgot to mention you need to add "--new-consumer" as well.

Guozhang

On Mon, Jan 25, 2016 at 7:11 PM, Yifan Ying <na...@gmail.com> wrote:

> Thanks for reply, Guozhang. I got 'Missing required argument "[zookeeper]"'
> after running that.
>
>
> Yifan
>
> On Mon, Jan 25, 2016 at 6:05 PM, Guozhang Wang <wa...@gmail.com> wrote:
>
> > Yifan,
> >
> > Offset checker has been deprecated in 0.9.0 (search for
> > "kafka-consumer-groups.sh"):
> >
> > http://kafka.apache.org/documentation.html#upgrade
> >
> > If you are using the new consumer, then its metadata is not registered in
> > ZK, so you should use the --bootstrap-server option instead of
> --zookeeper:
> >
> > ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
> >
> > Guozhang
> >
> > On Mon, Jan 25, 2016 at 5:03 PM, Yifan Ying <na...@gmail.com> wrote:
> >
> > > Hi All,
> > >
> > > For Kafka 0.8.2, I was using kafka-consumer-offset-checker.sh to get a
> > > consumer group's offset . Now I am testing against Kafka 0.9 , but the
> > same
> > > tool always gave me
> > >
> > >
> > > Exiting due to: org.apache.zookeeper.KeeperException$NoNodeException:
> > > KeeperErrorCode = NoNode for /consumers/
> > >
> > >
> > > I saw "Committed offset 21 for partition ..." from debug logs and the
> > > consumer doesn't re-consume messages after next time the app starts.
> That
> > > means the Kafka broker has the offset.
> > >
> > > Then I tried
> > >
> > > ./kafka-consumer-groups.sh --zookeeper localhost:2181 --list
> > >
> > > but still not able to get any consumer groups from the list. Does
> anyone
> > > know how to get consumer offset with Kafka 0.9?
> > >
> > >
> > > Thanks.
> > >
> > >
> > > --
> > > Yifan
> > >
> >
> >
> >
> > --
> > -- Guozhang
> >
>
>
>
> --
> Yifan
>



-- 
-- Guozhang

Re: Tool to get consumer offset

Posted by Yifan Ying <na...@gmail.com>.
Thanks for reply, Guozhang. I got 'Missing required argument "[zookeeper]"'
after running that.


Yifan

On Mon, Jan 25, 2016 at 6:05 PM, Guozhang Wang <wa...@gmail.com> wrote:

> Yifan,
>
> Offset checker has been deprecated in 0.9.0 (search for
> "kafka-consumer-groups.sh"):
>
> http://kafka.apache.org/documentation.html#upgrade
>
> If you are using the new consumer, then its metadata is not registered in
> ZK, so you should use the --bootstrap-server option instead of --zookeeper:
>
> ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
>
> Guozhang
>
> On Mon, Jan 25, 2016 at 5:03 PM, Yifan Ying <na...@gmail.com> wrote:
>
> > Hi All,
> >
> > For Kafka 0.8.2, I was using kafka-consumer-offset-checker.sh to get a
> > consumer group's offset . Now I am testing against Kafka 0.9 , but the
> same
> > tool always gave me
> >
> >
> > Exiting due to: org.apache.zookeeper.KeeperException$NoNodeException:
> > KeeperErrorCode = NoNode for /consumers/
> >
> >
> > I saw "Committed offset 21 for partition ..." from debug logs and the
> > consumer doesn't re-consume messages after next time the app starts. That
> > means the Kafka broker has the offset.
> >
> > Then I tried
> >
> > ./kafka-consumer-groups.sh --zookeeper localhost:2181 --list
> >
> > but still not able to get any consumer groups from the list. Does anyone
> > know how to get consumer offset with Kafka 0.9?
> >
> >
> > Thanks.
> >
> >
> > --
> > Yifan
> >
>
>
>
> --
> -- Guozhang
>



-- 
Yifan

Re: Tool to get consumer offset

Posted by Guozhang Wang <wa...@gmail.com>.
Yifan,

Offset checker has been deprecated in 0.9.0 (search for
"kafka-consumer-groups.sh"):

http://kafka.apache.org/documentation.html#upgrade

If you are using the new consumer, then its metadata is not registered in
ZK, so you should use the --bootstrap-server option instead of --zookeeper:

./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list

Guozhang

On Mon, Jan 25, 2016 at 5:03 PM, Yifan Ying <na...@gmail.com> wrote:

> Hi All,
>
> For Kafka 0.8.2, I was using kafka-consumer-offset-checker.sh to get a
> consumer group's offset . Now I am testing against Kafka 0.9 , but the same
> tool always gave me
>
>
> Exiting due to: org.apache.zookeeper.KeeperException$NoNodeException:
> KeeperErrorCode = NoNode for /consumers/
>
>
> I saw "Committed offset 21 for partition ..." from debug logs and the
> consumer doesn't re-consume messages after next time the app starts. That
> means the Kafka broker has the offset.
>
> Then I tried
>
> ./kafka-consumer-groups.sh --zookeeper localhost:2181 --list
>
> but still not able to get any consumer groups from the list. Does anyone
> know how to get consumer offset with Kafka 0.9?
>
>
> Thanks.
>
>
> --
> Yifan
>



-- 
-- Guozhang