You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Vadim Keylis <vk...@gmail.com> on 2013/08/22 19:01:40 UTC
No leaders elected after topics created
I ran command to create 300 topics sequentially. Kafka create topic script
return with topic created successfully message. However running
kafka-list-topics.sh script showed to me that no leaders been selected and
no servers listed in ISR. First inspection of the logs showed no obvious
signs of the problem. After restarting kafka. I did a few restarts of kafka
service and its now showing that most partitions have brokers.
Second issue is with delete partition script. I attempted to delete topics
to begin fresh start. Even those script says it deleted partition
successfully, I still see no leader found exception.
Any suggestions on whats going on and how to avoid in the future?
Re: No leaders elected after topics created
Posted by Vadim Keylis <vk...@gmail.com>.
I only need to delete topics when I want to start from clean state.
I still unclear why leaders were not elected after create script printed
message that topic was created successfully
Thanks,
Vadim
On Thu, Aug 22, 2013 at 12:28 PM, Neha Narkhede <ne...@gmail.com>wrote:
> I see the issue. I think the 0.8-beta included the script, but we later
> removed it. We still don't have support for the delete topic feature, so I
> recommend not using it.
>
> How long did you wait for the leaders to get elected before you attempted
> to delete the topics?
>
> Thanks,
> Neha
>
>
> On Thu, Aug 22, 2013 at 11:30 AM, Vadim Keylis <vkeylis2009@gmail.com
> >wrote:
>
> > Hello Neha. The topics should of been available since I ran list-topics
> > script 5 hours later after creating topics.
> > I am reffering to kafka-delete-topic.sh script that I got from kafka git
> > repository.
> >
> > Thanks,
> > Vadim
> >
> >
> > On Thu, Aug 22, 2013 at 11:05 AM, Neha Narkhede <neha.narkhede@gmail.com
> > >wrote:
> >
> > > As part of topic creation, the controller broker has to elect leader
> for
> > > each of the topics and this involves a few writes to zookeeper. So it
> > might
> > > take several seconds to complete leader election for 300 topics and
> that
> > > time would increase if you have many partitions per topic.
> > >
> > > Which delete partition script are you referring to? We don't have a
> > delete
> > > topic feature in Kafka yet. So you can only create more partitions, but
> > not
> > > delete them.
> > >
> > > Thanks,
> > > Neha
> > >
> > >
> > > On Thu, Aug 22, 2013 at 10:01 AM, Vadim Keylis <vkeylis2009@gmail.com
> > > >wrote:
> > >
> > > > I ran command to create 300 topics sequentially. Kafka create topic
> > > script
> > > > return with topic created successfully message. However running
> > > > kafka-list-topics.sh script showed to me that no leaders been
> selected
> > > and
> > > > no servers listed in ISR. First inspection of the logs showed no
> > obvious
> > > > signs of the problem. After restarting kafka. I did a few restarts of
> > > kafka
> > > > service and its now showing that most partitions have brokers.
> > > >
> > > > Second issue is with delete partition script. I attempted to delete
> > > topics
> > > > to begin fresh start. Even those script says it deleted partition
> > > > successfully, I still see no leader found exception.
> > > >
> > > > Any suggestions on whats going on and how to avoid in the future?
> > > >
> > >
> >
>
Re: No leaders elected after topics created
Posted by Neha Narkhede <ne...@gmail.com>.
I see the issue. I think the 0.8-beta included the script, but we later
removed it. We still don't have support for the delete topic feature, so I
recommend not using it.
How long did you wait for the leaders to get elected before you attempted
to delete the topics?
Thanks,
Neha
On Thu, Aug 22, 2013 at 11:30 AM, Vadim Keylis <vk...@gmail.com>wrote:
> Hello Neha. The topics should of been available since I ran list-topics
> script 5 hours later after creating topics.
> I am reffering to kafka-delete-topic.sh script that I got from kafka git
> repository.
>
> Thanks,
> Vadim
>
>
> On Thu, Aug 22, 2013 at 11:05 AM, Neha Narkhede <neha.narkhede@gmail.com
> >wrote:
>
> > As part of topic creation, the controller broker has to elect leader for
> > each of the topics and this involves a few writes to zookeeper. So it
> might
> > take several seconds to complete leader election for 300 topics and that
> > time would increase if you have many partitions per topic.
> >
> > Which delete partition script are you referring to? We don't have a
> delete
> > topic feature in Kafka yet. So you can only create more partitions, but
> not
> > delete them.
> >
> > Thanks,
> > Neha
> >
> >
> > On Thu, Aug 22, 2013 at 10:01 AM, Vadim Keylis <vkeylis2009@gmail.com
> > >wrote:
> >
> > > I ran command to create 300 topics sequentially. Kafka create topic
> > script
> > > return with topic created successfully message. However running
> > > kafka-list-topics.sh script showed to me that no leaders been selected
> > and
> > > no servers listed in ISR. First inspection of the logs showed no
> obvious
> > > signs of the problem. After restarting kafka. I did a few restarts of
> > kafka
> > > service and its now showing that most partitions have brokers.
> > >
> > > Second issue is with delete partition script. I attempted to delete
> > topics
> > > to begin fresh start. Even those script says it deleted partition
> > > successfully, I still see no leader found exception.
> > >
> > > Any suggestions on whats going on and how to avoid in the future?
> > >
> >
>
Re: No leaders elected after topics created
Posted by Vadim Keylis <vk...@gmail.com>.
Hello Neha. The topics should of been available since I ran list-topics
script 5 hours later after creating topics.
I am reffering to kafka-delete-topic.sh script that I got from kafka git
repository.
Thanks,
Vadim
On Thu, Aug 22, 2013 at 11:05 AM, Neha Narkhede <ne...@gmail.com>wrote:
> As part of topic creation, the controller broker has to elect leader for
> each of the topics and this involves a few writes to zookeeper. So it might
> take several seconds to complete leader election for 300 topics and that
> time would increase if you have many partitions per topic.
>
> Which delete partition script are you referring to? We don't have a delete
> topic feature in Kafka yet. So you can only create more partitions, but not
> delete them.
>
> Thanks,
> Neha
>
>
> On Thu, Aug 22, 2013 at 10:01 AM, Vadim Keylis <vkeylis2009@gmail.com
> >wrote:
>
> > I ran command to create 300 topics sequentially. Kafka create topic
> script
> > return with topic created successfully message. However running
> > kafka-list-topics.sh script showed to me that no leaders been selected
> and
> > no servers listed in ISR. First inspection of the logs showed no obvious
> > signs of the problem. After restarting kafka. I did a few restarts of
> kafka
> > service and its now showing that most partitions have brokers.
> >
> > Second issue is with delete partition script. I attempted to delete
> topics
> > to begin fresh start. Even those script says it deleted partition
> > successfully, I still see no leader found exception.
> >
> > Any suggestions on whats going on and how to avoid in the future?
> >
>
Re: No leaders elected after topics created
Posted by Neha Narkhede <ne...@gmail.com>.
As part of topic creation, the controller broker has to elect leader for
each of the topics and this involves a few writes to zookeeper. So it might
take several seconds to complete leader election for 300 topics and that
time would increase if you have many partitions per topic.
Which delete partition script are you referring to? We don't have a delete
topic feature in Kafka yet. So you can only create more partitions, but not
delete them.
Thanks,
Neha
On Thu, Aug 22, 2013 at 10:01 AM, Vadim Keylis <vk...@gmail.com>wrote:
> I ran command to create 300 topics sequentially. Kafka create topic script
> return with topic created successfully message. However running
> kafka-list-topics.sh script showed to me that no leaders been selected and
> no servers listed in ISR. First inspection of the logs showed no obvious
> signs of the problem. After restarting kafka. I did a few restarts of kafka
> service and its now showing that most partitions have brokers.
>
> Second issue is with delete partition script. I attempted to delete topics
> to begin fresh start. Even those script says it deleted partition
> successfully, I still see no leader found exception.
>
> Any suggestions on whats going on and how to avoid in the future?
>
Re: No leaders elected after topics created
Posted by Vadim Keylis <vk...@gmail.com>.
Sorry Jun. Somehow logs from that particular event got wiped out.
On Thu, Aug 22, 2013 at 8:59 PM, Jun Rao <ju...@gmail.com> wrote:
> Any error in the controller and state-change log?
>
> Thanks,
>
> Jun
>
>
> On Thu, Aug 22, 2013 at 10:01 AM, Vadim Keylis <vkeylis2009@gmail.com
> >wrote:
>
> > I ran command to create 300 topics sequentially. Kafka create topic
> script
> > return with topic created successfully message. However running
> > kafka-list-topics.sh script showed to me that no leaders been selected
> and
> > no servers listed in ISR. First inspection of the logs showed no obvious
> > signs of the problem. After restarting kafka. I did a few restarts of
> kafka
> > service and its now showing that most partitions have brokers.
> >
> > Second issue is with delete partition script. I attempted to delete
> topics
> > to begin fresh start. Even those script says it deleted partition
> > successfully, I still see no leader found exception.
> >
> > Any suggestions on whats going on and how to avoid in the future?
> >
>
Re: No leaders elected after topics created
Posted by Jun Rao <ju...@gmail.com>.
Any error in the controller and state-change log?
Thanks,
Jun
On Thu, Aug 22, 2013 at 10:01 AM, Vadim Keylis <vk...@gmail.com>wrote:
> I ran command to create 300 topics sequentially. Kafka create topic script
> return with topic created successfully message. However running
> kafka-list-topics.sh script showed to me that no leaders been selected and
> no servers listed in ISR. First inspection of the logs showed no obvious
> signs of the problem. After restarting kafka. I did a few restarts of kafka
> service and its now showing that most partitions have brokers.
>
> Second issue is with delete partition script. I attempted to delete topics
> to begin fresh start. Even those script says it deleted partition
> successfully, I still see no leader found exception.
>
> Any suggestions on whats going on and how to avoid in the future?
>