You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Cheolwoo Choi <pr...@gmail.com> on 2014/01/07 08:30:11 UTC

kafka.common.NoBrokersForPartitionException: Partition = null

Hi, all ~

There are 3 zookepers and one broker, Kafka 0.7.2.
I got some temporary problems in zk cluster enviornment, but, any zk
processes didn't go down.

A broker got zk session timeout message, then got zk disconnected and
expired message.
After 10 secs, the broker reconnected to the zk with new zk session id,
then it regitsterd all topics successfully.

But, kafka producers continuously throw
"kafka.common.NoBrokersForPartitionException: Partition = null".
The broker had got back in stable. However, producers didn't stop to throw
the exceptions.

How can I prevent that problem ?

Thanks,

Re: kafka.common.NoBrokersForPartitionException: Partition = null

Posted by Joe Stein <jo...@stealth.ly>.
That issue has been uncovered
https://issues.apache.org/jira/browse/KAFKA-778 as occurring when the
producer sees 0 partitions for a topic.

A quick fix might be to change over your topic name to something new so it
gets auto created again and disband the old topic name.

Longer term fix would be to move on to 0.8.0

/*******************************************
 Joe Stein
 Founder, Principal Consultant
 Big Data Open Source Security LLC
 http://www.stealth.ly
 Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
********************************************/


On Tue, Jan 7, 2014 at 2:30 AM, Cheolwoo Choi <pr...@gmail.com> wrote:

> Hi, all ~
>
> There are 3 zookepers and one broker, Kafka 0.7.2.
> I got some temporary problems in zk cluster enviornment, but, any zk
> processes didn't go down.
>
> A broker got zk session timeout message, then got zk disconnected and
> expired message.
> After 10 secs, the broker reconnected to the zk with new zk session id,
> then it regitsterd all topics successfully.
>
> But, kafka producers continuously throw
> "kafka.common.NoBrokersForPartitionException: Partition = null".
> The broker had got back in stable. However, producers didn't stop to throw
> the exceptions.
>
> How can I prevent that problem ?
>
> Thanks,
>

Re: kafka.common.NoBrokersForPartitionException: Partition = null

Posted by Jun Rao <ju...@gmail.com>.
It's not exactly clear to me why you see NoBrokersForPartitionException
after the broker is restarted. I was thinking that one potential issue
could be that a ZK bug caused a missing watcher.

Thanks,

Jun


On Tue, Jan 7, 2014 at 9:17 PM, Cheolwoo Choi <pr...@gmail.com> wrote:

> You mean ...
>
> ZK 3.3.4 is more stable as you have been using that without problem.
> Even using zk 3.3.4, it can't avoid the "NoBrokersForPartitionException" at
> Producer.
>
> It's good for me to change to zk 3.3.4,
> and if I want to avoid the NoBrokersForPartitionException,
> I should catch the exception, then choose alternative flow in my service
> logic.
> (i.e. changing my topic name to new one as Joe mentioned above reply)
>
> Right ?
>
> We have a plan to move to kafka-0.8. Is zk 3.3.4 stable for 0.8 ?
>
>
> Thanks,
> Cheolwoo
>
>
>
> On Wed, Jan 8, 2014 at 1:51 PM, Jun Rao <ju...@gmail.com> wrote:
>
> > The issues that you saw could be related to ZK. Not sure how stable 3.4.5
> > is. We have been using 3.3.4 and it seems stable.
> >
> > Thanks,
> >
> > Jun
> >
> >
> > On Tue, Jan 7, 2014 at 4:09 PM, Cheolwoo Choi <pr...@gmail.com> wrote:
> >
> > > I'm using zk-3.4.5
> > >
> > > Thanks,
> > >
> > >
> > >
> > > On Wed, Jan 8, 2014 at 1:30 AM, Jun Rao <ju...@gmail.com> wrote:
> > >
> > > > What version of ZK are you using?
> > > >
> > > > Thanks,
> > > >
> > > > Jun
> > > >
> > > >
> > > > On Mon, Jan 6, 2014 at 11:30 PM, Cheolwoo Choi <pr...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi, all ~
> > > > >
> > > > > There are 3 zookepers and one broker, Kafka 0.7.2.
> > > > > I got some temporary problems in zk cluster enviornment, but, any
> zk
> > > > > processes didn't go down.
> > > > >
> > > > > A broker got zk session timeout message, then got zk disconnected
> and
> > > > > expired message.
> > > > > After 10 secs, the broker reconnected to the zk with new zk session
> > id,
> > > > > then it regitsterd all topics successfully.
> > > > >
> > > > > But, kafka producers continuously throw
> > > > > "kafka.common.NoBrokersForPartitionException: Partition = null".
> > > > > The broker had got back in stable. However, producers didn't stop
> to
> > > > throw
> > > > > the exceptions.
> > > > >
> > > > > How can I prevent that problem ?
> > > > >
> > > > > Thanks,
> > > > >
> > > >
> > >
> >
>

Re: kafka.common.NoBrokersForPartitionException: Partition = null

Posted by Cheolwoo Choi <pr...@gmail.com>.
You mean ...

ZK 3.3.4 is more stable as you have been using that without problem.
Even using zk 3.3.4, it can't avoid the "NoBrokersForPartitionException" at
Producer.

It's good for me to change to zk 3.3.4,
and if I want to avoid the NoBrokersForPartitionException,
I should catch the exception, then choose alternative flow in my service
logic.
(i.e. changing my topic name to new one as Joe mentioned above reply)

Right ?

We have a plan to move to kafka-0.8. Is zk 3.3.4 stable for 0.8 ?


Thanks,
Cheolwoo



On Wed, Jan 8, 2014 at 1:51 PM, Jun Rao <ju...@gmail.com> wrote:

> The issues that you saw could be related to ZK. Not sure how stable 3.4.5
> is. We have been using 3.3.4 and it seems stable.
>
> Thanks,
>
> Jun
>
>
> On Tue, Jan 7, 2014 at 4:09 PM, Cheolwoo Choi <pr...@gmail.com> wrote:
>
> > I'm using zk-3.4.5
> >
> > Thanks,
> >
> >
> >
> > On Wed, Jan 8, 2014 at 1:30 AM, Jun Rao <ju...@gmail.com> wrote:
> >
> > > What version of ZK are you using?
> > >
> > > Thanks,
> > >
> > > Jun
> > >
> > >
> > > On Mon, Jan 6, 2014 at 11:30 PM, Cheolwoo Choi <pr...@gmail.com>
> > wrote:
> > >
> > > > Hi, all ~
> > > >
> > > > There are 3 zookepers and one broker, Kafka 0.7.2.
> > > > I got some temporary problems in zk cluster enviornment, but, any zk
> > > > processes didn't go down.
> > > >
> > > > A broker got zk session timeout message, then got zk disconnected and
> > > > expired message.
> > > > After 10 secs, the broker reconnected to the zk with new zk session
> id,
> > > > then it regitsterd all topics successfully.
> > > >
> > > > But, kafka producers continuously throw
> > > > "kafka.common.NoBrokersForPartitionException: Partition = null".
> > > > The broker had got back in stable. However, producers didn't stop to
> > > throw
> > > > the exceptions.
> > > >
> > > > How can I prevent that problem ?
> > > >
> > > > Thanks,
> > > >
> > >
> >
>

Re: kafka.common.NoBrokersForPartitionException: Partition = null

Posted by Jun Rao <ju...@gmail.com>.
The issues that you saw could be related to ZK. Not sure how stable 3.4.5
is. We have been using 3.3.4 and it seems stable.

Thanks,

Jun


On Tue, Jan 7, 2014 at 4:09 PM, Cheolwoo Choi <pr...@gmail.com> wrote:

> I'm using zk-3.4.5
>
> Thanks,
>
>
>
> On Wed, Jan 8, 2014 at 1:30 AM, Jun Rao <ju...@gmail.com> wrote:
>
> > What version of ZK are you using?
> >
> > Thanks,
> >
> > Jun
> >
> >
> > On Mon, Jan 6, 2014 at 11:30 PM, Cheolwoo Choi <pr...@gmail.com>
> wrote:
> >
> > > Hi, all ~
> > >
> > > There are 3 zookepers and one broker, Kafka 0.7.2.
> > > I got some temporary problems in zk cluster enviornment, but, any zk
> > > processes didn't go down.
> > >
> > > A broker got zk session timeout message, then got zk disconnected and
> > > expired message.
> > > After 10 secs, the broker reconnected to the zk with new zk session id,
> > > then it regitsterd all topics successfully.
> > >
> > > But, kafka producers continuously throw
> > > "kafka.common.NoBrokersForPartitionException: Partition = null".
> > > The broker had got back in stable. However, producers didn't stop to
> > throw
> > > the exceptions.
> > >
> > > How can I prevent that problem ?
> > >
> > > Thanks,
> > >
> >
>

Re: kafka.common.NoBrokersForPartitionException: Partition = null

Posted by Cheolwoo Choi <pr...@gmail.com>.
I'm using zk-3.4.5

Thanks,



On Wed, Jan 8, 2014 at 1:30 AM, Jun Rao <ju...@gmail.com> wrote:

> What version of ZK are you using?
>
> Thanks,
>
> Jun
>
>
> On Mon, Jan 6, 2014 at 11:30 PM, Cheolwoo Choi <pr...@gmail.com> wrote:
>
> > Hi, all ~
> >
> > There are 3 zookepers and one broker, Kafka 0.7.2.
> > I got some temporary problems in zk cluster enviornment, but, any zk
> > processes didn't go down.
> >
> > A broker got zk session timeout message, then got zk disconnected and
> > expired message.
> > After 10 secs, the broker reconnected to the zk with new zk session id,
> > then it regitsterd all topics successfully.
> >
> > But, kafka producers continuously throw
> > "kafka.common.NoBrokersForPartitionException: Partition = null".
> > The broker had got back in stable. However, producers didn't stop to
> throw
> > the exceptions.
> >
> > How can I prevent that problem ?
> >
> > Thanks,
> >
>

Re: kafka.common.NoBrokersForPartitionException: Partition = null

Posted by Jun Rao <ju...@gmail.com>.
What version of ZK are you using?

Thanks,

Jun


On Mon, Jan 6, 2014 at 11:30 PM, Cheolwoo Choi <pr...@gmail.com> wrote:

> Hi, all ~
>
> There are 3 zookepers and one broker, Kafka 0.7.2.
> I got some temporary problems in zk cluster enviornment, but, any zk
> processes didn't go down.
>
> A broker got zk session timeout message, then got zk disconnected and
> expired message.
> After 10 secs, the broker reconnected to the zk with new zk session id,
> then it regitsterd all topics successfully.
>
> But, kafka producers continuously throw
> "kafka.common.NoBrokersForPartitionException: Partition = null".
> The broker had got back in stable. However, producers didn't stop to throw
> the exceptions.
>
> How can I prevent that problem ?
>
> Thanks,
>