You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by 陈翔 <la...@hotmail.com> on 2014/07/07 11:59:49 UTC
How recover leader when broker restart
i have 3 broker,when i restart a broker 1,then 1 can not as leader.i want to know how i can recover broker 1 as a leader.
thanks,
lax
Re: How recover leader when broker restart
Posted by 鞠大升 <da...@gmail.com>.
I think I have encounter same problem with you, @chenlax
please refer to dev@kafka.apache.org, title: "topic's partition have no
leader and isr", and I will transfer the mail to users@kafka.apache.org.
On Wed, Jul 9, 2014 at 10:46 AM, chenlax <la...@hotmail.com> wrote:
> thank you Guozhang,;i don't know why the isr==null and i can't reappear
> it, all brokers are working,and add new topic succesfully.
> Thanks,
> Lax
>
>
> > Date: Tue, 8 Jul 2014 11:29:05 -0700
> > Subject: Re: How recover leader when broker restart
> > From: wangguoz@gmail.com
> > To: users@kafka.apache.org
> >
> > Lax,
> >
> > Under that scenario you would better first fix the issue of isr==null by
> > checking if anything went wrong on the brokers.
> >
> > Guozhang
> >
> >
> > On Mon, Jul 7, 2014 at 8:43 PM, chenlax <la...@hotmail.com> wrote:
> >
> > > use preferred tool can rebalance leadership,but if the isr are null
> then
> > > the leader is only -1,how i can recover the leader.
> > >
> > >
> > > Thanks,
> > > Lax
> > >
> > >
> > > > Date: Mon, 7 Jul 2014 08:06:16 -0700
> > > > Subject: Re: How recover leader when broker restart
> > > > From: wangguoz@gmail.com
> > > > To: users@kafka.apache.org
> > > >
> > > > You can use the preferred leader election tool to move the
> leadership.
> > > >
> > > >
> > >
> https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.PreferredReplicaLeaderElectionTool
> > > >
> > > > Guozhang
> > > >
> > > >
> > > > On Mon, Jul 7, 2014 at 7:56 AM, 鞠大升 <da...@gmail.com> wrote:
> > > >
> > > > > you can use the preferred leader election tool to reset leaders to
> > > > > preferred replicas.
> > > > > 2014年7月7日 PM10:37于 "François Langelier" <f....@gmail.com>写道:
> > > > >
> > > > > > AFAIK, the simplest way will be to shutdown your 2 others brokers
> > > after
> > > > > you
> > > > > > restarted your broker 1, which will force your topics to have
> your
> > > > > broker 1
> > > > > > as leader since it's the only one available, and then restart
> your
> > > > > brokers
> > > > > > 2 and 3
> > > > > >
> > > > > > But I can't really see why you want your leaders on broker 1...
> > > > > >
> > > > > >
> > > > > >
> > > > > > François Langelier
> > > > > > Étudiant en génie Logiciel - École de Technologie Supérieure
> > > > > > <http://www.etsmtl.ca/>
> > > > > > Capitaine Club Capra <http://capra.etsmtl.ca/>
> > > > > > VP-Communication - CS Games <http://csgames.org> 2014
> > > > > > Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
> > > > > > Argentier Fraternité du Piranha <http://fraternitedupiranha.com/
> >
> > > > > > 2012-2014
> > > > > > Comité Organisateur Olympiades ÉTS 2012
> > > > > > Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
> > > > > >
> > > > > >
> > > > > > On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
> > > > > >
> > > > > > > i have 3 broker,when i restart a broker 1,then 1 can not as
> > > leader.i
> > > > > want
> > > > > > > to know how i can recover broker 1 as a leader.
> > > > > > >
> > > > > > > thanks,
> > > > > > > lax
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -- Guozhang
> > >
> > >
> >
> >
> >
> > --
> > -- Guozhang
>
>
--
dashengju
+86 13810875910
dashengju@gmail.com
RE: How recover leader when broker restart
Posted by chenlax <la...@hotmail.com>.
thank you Guozhang,;i don't know why the isr==null and i can't reappear it, all brokers are working,and add new topic succesfully.
Thanks,
Lax
> Date: Tue, 8 Jul 2014 11:29:05 -0700
> Subject: Re: How recover leader when broker restart
> From: wangguoz@gmail.com
> To: users@kafka.apache.org
>
> Lax,
>
> Under that scenario you would better first fix the issue of isr==null by
> checking if anything went wrong on the brokers.
>
> Guozhang
>
>
> On Mon, Jul 7, 2014 at 8:43 PM, chenlax <la...@hotmail.com> wrote:
>
> > use preferred tool can rebalance leadership,but if the isr are null then
> > the leader is only -1,how i can recover the leader.
> >
> >
> > Thanks,
> > Lax
> >
> >
> > > Date: Mon, 7 Jul 2014 08:06:16 -0700
> > > Subject: Re: How recover leader when broker restart
> > > From: wangguoz@gmail.com
> > > To: users@kafka.apache.org
> > >
> > > You can use the preferred leader election tool to move the leadership.
> > >
> > >
> > https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.PreferredReplicaLeaderElectionTool
> > >
> > > Guozhang
> > >
> > >
> > > On Mon, Jul 7, 2014 at 7:56 AM, 鞠大升 <da...@gmail.com> wrote:
> > >
> > > > you can use the preferred leader election tool to reset leaders to
> > > > preferred replicas.
> > > > 2014年7月7日 PM10:37于 "François Langelier" <f....@gmail.com>写道:
> > > >
> > > > > AFAIK, the simplest way will be to shutdown your 2 others brokers
> > after
> > > > you
> > > > > restarted your broker 1, which will force your topics to have your
> > > > broker 1
> > > > > as leader since it's the only one available, and then restart your
> > > > brokers
> > > > > 2 and 3
> > > > >
> > > > > But I can't really see why you want your leaders on broker 1...
> > > > >
> > > > >
> > > > >
> > > > > François Langelier
> > > > > Étudiant en génie Logiciel - École de Technologie Supérieure
> > > > > <http://www.etsmtl.ca/>
> > > > > Capitaine Club Capra <http://capra.etsmtl.ca/>
> > > > > VP-Communication - CS Games <http://csgames.org> 2014
> > > > > Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
> > > > > Argentier Fraternité du Piranha <http://fraternitedupiranha.com/>
> > > > > 2012-2014
> > > > > Comité Organisateur Olympiades ÉTS 2012
> > > > > Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
> > > > >
> > > > >
> > > > > On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
> > > > >
> > > > > > i have 3 broker,when i restart a broker 1,then 1 can not as
> > leader.i
> > > > want
> > > > > > to know how i can recover broker 1 as a leader.
> > > > > >
> > > > > > thanks,
> > > > > > lax
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > -- Guozhang
> >
> >
>
>
>
> --
> -- Guozhang
Re: How recover leader when broker restart
Posted by Guozhang Wang <wa...@gmail.com>.
Lax,
Under that scenario you would better first fix the issue of isr==null by
checking if anything went wrong on the brokers.
Guozhang
On Mon, Jul 7, 2014 at 8:43 PM, chenlax <la...@hotmail.com> wrote:
> use preferred tool can rebalance leadership,but if the isr are null then
> the leader is only -1,how i can recover the leader.
>
>
> Thanks,
> Lax
>
>
> > Date: Mon, 7 Jul 2014 08:06:16 -0700
> > Subject: Re: How recover leader when broker restart
> > From: wangguoz@gmail.com
> > To: users@kafka.apache.org
> >
> > You can use the preferred leader election tool to move the leadership.
> >
> >
> https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.PreferredReplicaLeaderElectionTool
> >
> > Guozhang
> >
> >
> > On Mon, Jul 7, 2014 at 7:56 AM, 鞠大升 <da...@gmail.com> wrote:
> >
> > > you can use the preferred leader election tool to reset leaders to
> > > preferred replicas.
> > > 2014年7月7日 PM10:37于 "François Langelier" <f....@gmail.com>写道:
> > >
> > > > AFAIK, the simplest way will be to shutdown your 2 others brokers
> after
> > > you
> > > > restarted your broker 1, which will force your topics to have your
> > > broker 1
> > > > as leader since it's the only one available, and then restart your
> > > brokers
> > > > 2 and 3
> > > >
> > > > But I can't really see why you want your leaders on broker 1...
> > > >
> > > >
> > > >
> > > > François Langelier
> > > > Étudiant en génie Logiciel - École de Technologie Supérieure
> > > > <http://www.etsmtl.ca/>
> > > > Capitaine Club Capra <http://capra.etsmtl.ca/>
> > > > VP-Communication - CS Games <http://csgames.org> 2014
> > > > Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
> > > > Argentier Fraternité du Piranha <http://fraternitedupiranha.com/>
> > > > 2012-2014
> > > > Comité Organisateur Olympiades ÉTS 2012
> > > > Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
> > > >
> > > >
> > > > On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
> > > >
> > > > > i have 3 broker,when i restart a broker 1,then 1 can not as
> leader.i
> > > want
> > > > > to know how i can recover broker 1 as a leader.
> > > > >
> > > > > thanks,
> > > > > lax
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > -- Guozhang
>
>
--
-- Guozhang
RE: How recover leader when broker restart
Posted by chenlax <la...@hotmail.com>.
use preferred tool can rebalance leadership,but if the isr are null then the leader is only -1,how i can recover the leader.
Thanks,
Lax
> Date: Mon, 7 Jul 2014 08:06:16 -0700
> Subject: Re: How recover leader when broker restart
> From: wangguoz@gmail.com
> To: users@kafka.apache.org
>
> You can use the preferred leader election tool to move the leadership.
>
> https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.PreferredReplicaLeaderElectionTool
>
> Guozhang
>
>
> On Mon, Jul 7, 2014 at 7:56 AM, 鞠大升 <da...@gmail.com> wrote:
>
> > you can use the preferred leader election tool to reset leaders to
> > preferred replicas.
> > 2014年7月7日 PM10:37于 "François Langelier" <f....@gmail.com>写道:
> >
> > > AFAIK, the simplest way will be to shutdown your 2 others brokers after
> > you
> > > restarted your broker 1, which will force your topics to have your
> > broker 1
> > > as leader since it's the only one available, and then restart your
> > brokers
> > > 2 and 3
> > >
> > > But I can't really see why you want your leaders on broker 1...
> > >
> > >
> > >
> > > François Langelier
> > > Étudiant en génie Logiciel - École de Technologie Supérieure
> > > <http://www.etsmtl.ca/>
> > > Capitaine Club Capra <http://capra.etsmtl.ca/>
> > > VP-Communication - CS Games <http://csgames.org> 2014
> > > Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
> > > Argentier Fraternité du Piranha <http://fraternitedupiranha.com/>
> > > 2012-2014
> > > Comité Organisateur Olympiades ÉTS 2012
> > > Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
> > >
> > >
> > > On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
> > >
> > > > i have 3 broker,when i restart a broker 1,then 1 can not as leader.i
> > want
> > > > to know how i can recover broker 1 as a leader.
> > > >
> > > > thanks,
> > > > lax
> > > >
> > >
> >
>
>
>
> --
> -- Guozhang
Re: How recover leader when broker restart
Posted by Guozhang Wang <wa...@gmail.com>.
You can use the preferred leader election tool to move the leadership.
https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.PreferredReplicaLeaderElectionTool
Guozhang
On Mon, Jul 7, 2014 at 7:56 AM, 鞠大升 <da...@gmail.com> wrote:
> you can use the preferred leader election tool to reset leaders to
> preferred replicas.
> 2014年7月7日 PM10:37于 "François Langelier" <f....@gmail.com>写道:
>
> > AFAIK, the simplest way will be to shutdown your 2 others brokers after
> you
> > restarted your broker 1, which will force your topics to have your
> broker 1
> > as leader since it's the only one available, and then restart your
> brokers
> > 2 and 3
> >
> > But I can't really see why you want your leaders on broker 1...
> >
> >
> >
> > François Langelier
> > Étudiant en génie Logiciel - École de Technologie Supérieure
> > <http://www.etsmtl.ca/>
> > Capitaine Club Capra <http://capra.etsmtl.ca/>
> > VP-Communication - CS Games <http://csgames.org> 2014
> > Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
> > Argentier Fraternité du Piranha <http://fraternitedupiranha.com/>
> > 2012-2014
> > Comité Organisateur Olympiades ÉTS 2012
> > Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
> >
> >
> > On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
> >
> > > i have 3 broker,when i restart a broker 1,then 1 can not as leader.i
> want
> > > to know how i can recover broker 1 as a leader.
> > >
> > > thanks,
> > > lax
> > >
> >
>
--
-- Guozhang
Re: How recover leader when broker restart
Posted by 鞠大升 <da...@gmail.com>.
you can use the preferred leader election tool to reset leaders to
preferred replicas.
2014年7月7日 PM10:37于 "François Langelier" <f....@gmail.com>写道:
> AFAIK, the simplest way will be to shutdown your 2 others brokers after you
> restarted your broker 1, which will force your topics to have your broker 1
> as leader since it's the only one available, and then restart your brokers
> 2 and 3
>
> But I can't really see why you want your leaders on broker 1...
>
>
>
> François Langelier
> Étudiant en génie Logiciel - École de Technologie Supérieure
> <http://www.etsmtl.ca/>
> Capitaine Club Capra <http://capra.etsmtl.ca/>
> VP-Communication - CS Games <http://csgames.org> 2014
> Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
> Argentier Fraternité du Piranha <http://fraternitedupiranha.com/>
> 2012-2014
> Comité Organisateur Olympiades ÉTS 2012
> Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
>
>
> On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
>
> > i have 3 broker,when i restart a broker 1,then 1 can not as leader.i want
> > to know how i can recover broker 1 as a leader.
> >
> > thanks,
> > lax
> >
>
Re: How recover leader when broker restart
Posted by François Langelier <f....@gmail.com>.
AFAIK, the simplest way will be to shutdown your 2 others brokers after you
restarted your broker 1, which will force your topics to have your broker 1
as leader since it's the only one available, and then restart your brokers
2 and 3
But I can't really see why you want your leaders on broker 1...
François Langelier
Étudiant en génie Logiciel - École de Technologie Supérieure
<http://www.etsmtl.ca/>
Capitaine Club Capra <http://capra.etsmtl.ca/>
VP-Communication - CS Games <http://csgames.org> 2014
Jeux de Génie <http://www.jdgets.com/> 2011 à 2014
Argentier Fraternité du Piranha <http://fraternitedupiranha.com/> 2012-2014
Comité Organisateur Olympiades ÉTS 2012
Compétition Québécoise d'Ingénierie 2012 - Compétition Senior
On 7 July 2014 05:59, 陈翔 <la...@hotmail.com> wrote:
> i have 3 broker,when i restart a broker 1,then 1 can not as leader.i want
> to know how i can recover broker 1 as a leader.
>
> thanks,
> lax
>