Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka, mail # user - How does a kafka of one have issues becoming a leader? ERROR Error while electing or becoming leader on broker


Copy link to this message
-
Re: How does a kafka of one have issues becoming a leader? ERROR Error while electing or becoming leader on broker
Guozhang Wang 2014-02-06, 03:25
Hi David,

Could you try to use the latest trunk code base and see if this issue goes
away?

Guozhang
On Wed, Feb 5, 2014 at 6:59 PM, David Montgomery
<[EMAIL PROTECTED]>wrote:

> Hi,
>
> How does a kafka of one have issues becoming a leader?  I am using kafka
> 8.0.  Should I just ignore this error?  How would I resolve?  I just have
> one kafka server in dev.
>
> Below is how I start kafka:
> /var/lib/kafka-0.8.0-src/bin/kafka-server-start.sh
> /var/lib/kafka-0.8.0-src/config/server.properties
>
>
>
> [2014-02-06 02:51:59,936] INFO Will not load MX4J, mx4j-tools.jar is not in
> the classpath (kafka.utils.Mx4jLoader$)
> [2014-02-06 02:51:59,964] INFO 1391209402 successfully elected as leader
> (kafka.server.ZookeeperLeaderElector)
> [2014-02-06 02:52:00,311] ERROR Error while electing or becoming leader on
> broker 1391209402 (kafka.server.ZookeeperLeaderElector)
> kafka.common.KafkaException: Can't parse json string: null
>         at kafka.utils.Json$.liftedTree1$1(Json.scala:36)
>         at kafka.utils.Json$.parseFull(Json.scala:32)
>         at
>
> kafka.utils.ZkUtils$$anonfun$getReplicaAssignmentForTopics$1.apply(ZkUtils.scala:529)
>         at
>
> kafka.utils.ZkUtils$$anonfun$getReplicaAssignmentForTopics$1.apply(ZkUtils.scala:525)
>         at
>
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
>         at scala.collection.immutable.List.foreach(List.scala:45)
>         at
> kafka.utils.ZkUtils$.getReplicaAssignmentForTopics(ZkUtils.scala:525)
>         at
>
> kafka.controller.KafkaController.initializeControllerContext(KafkaController.scala:535)
>         at
>
> kafka.controller.KafkaController.onControllerFailover(KafkaController.scala:240)
>         at
>
> kafka.controller.KafkaController$$anonfun$1.apply$mcV$sp(KafkaController.scala:111)
>         at
> kafka.server.ZookeeperLeaderElector.elect(ZookeeperLeaderElector.scala:62)
>         at
>
> kafka.server.ZookeeperLeaderElector.startup(ZookeeperLeaderElector.scala:46)
>         at
> kafka.controller.KafkaController.startup(KafkaController.scala:470)
>         at kafka.server.KafkaServer.startup(KafkaServer.scala:96)
>         at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)
>         at kafka.Kafka$.main(Kafka.scala:46)
>         at kafka.Kafka.main(Kafka.scala)
> Caused by: java.lang.NullPointerException
>         at
>
> scala.util.parsing.combinator.lexical.Scanners$Scanner.<init>(Scanners.scala:52)
>         at scala.util.parsing.json.JSON$.parseRaw(JSON.scala:71)
>         at scala.util.parsing.json.JSON$.parseFull(JSON.scala:85)
>         at kafka.utils.Json$.liftedTree1$1(Json.scala:33)
>         ... 16 more
> [2014-02-06 02:52:00,353] INFO [Kafka Server 1391209402], Started
> (kafka.server.KafkaServer)
> [2014-02-06 02:52:00,379] INFO New leader is 1391209402
> (kafka.server.ZookeeperLeaderElector$LeaderChangeListener)
>
>
>
> Thanks
>

--
-- Guozhang