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

Switch to Plain View
Kafka, mail # user - Cannot start Kafka 0.8, exception in leader election


+
Nicholas Tietz 2013-10-28, 23:13
+
Guozhang Wang 2013-10-28, 23:27
Copy link to this message
-
Re: Cannot start Kafka 0.8, exception in leader election
Neha Narkhede 2013-10-30, 05:32
Guozhang,

In this case, it seems like the controller is trying to talk to itself as
the controller establishes a channel with every broker in the cluster.

Thanks,
Neha
On Mon, Oct 28, 2013 at 4:26 PM, Guozhang Wang <[EMAIL PROTECTED]> wrote:

> Hello Nicholas,
>
> The log shows the controller cannot connect with one of the brokers due to
> "ava.net.ConnectException: Connection refused". Are all your brokers in the
> same cluster?
>
> Guozhang
>
>
> On Mon, Oct 28, 2013 at 3:37 PM, Nicholas Tietz <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
> >
> > I'm having some problems getting Kafka 0.8 running. (I'm running this on
> > Mac OS X 10.8 with the latest updates; Java version 1.6.0_51.) I followed
> > the instructions from the quickstart for 0.8, both from-source and
> > from-binary (cleaned up all related files each time). However, I am
> getting
> > an exception when I try to start the Kafka server.
> >
> > Below is the relevant output from the console output. I cut the beginning
> > and the end. The "INFO 0 successfully elected as leader", "ERROR while
> > electing [...]" and the exception recur until I terminate the process.
> >
> > Any help on this issue would be appreciated.
> >
> > Thanks,
> > Nicholas Tietz
> >
> > Relevant console output:
> > [...]
> > [2013-10-28 18:35:03,055] INFO zookeeper state changed (SyncConnected)
> > (org.I0Itec.zkclient.ZkClient)
> > [2013-10-28 18:35:03,093] INFO Registered broker 0 at path /brokers/ids/0
> > with address coffeemachine:9092. (kafka.utils.ZkUtils$)
> > [2013-10-28 18:35:03,094] INFO [Kafka Server 0], Connecting to ZK:
> > localhost:2181 (kafka.server.KafkaServer)
> > [2013-10-28 18:35:03,145] INFO Will not load MX4J, mx4j-tools.jar is not
> in
> > the classpath (kafka.utils.Mx4jLoader$)
> > [2013-10-28 18:35:03,151] INFO 0 successfully elected as leader
> > (kafka.server.ZookeeperLeaderElector)
> > [2013-10-28 18:35:03,263] ERROR Error while electing or becoming leader
> on
> > broker 0 (kafka.server.ZookeeperLeaderElector)
> > java.net.ConnectException: Connection refused
> >     at sun.nio.ch.Net.connect(Native Method)
> >     at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:532)
> >     at kafka.network.BlockingChannel.connect(BlockingChannel.scala:57)
> >     at
> >
> >
> kafka.controller.ControllerChannelManager.kafka$controller$ControllerChannelManager$$addNewBroker(ControllerChannelManager.scala:84)
> >     at
> >
> >
> kafka.controller.ControllerChannelManager$$anonfun$1.apply(ControllerChannelManager.scala:35)
> >     at
> >
> >
> kafka.controller.ControllerChannelManager$$anonfun$1.apply(ControllerChannelManager.scala:35)
> >     at scala.collection.immutable.Set$Set1.foreach(Set.scala:81)
> >     at
> >
> >
> kafka.controller.ControllerChannelManager.<init>(ControllerChannelManager.scala:35)
> >     at
> >
> >
> kafka.controller.KafkaController.startChannelManager(KafkaController.scala:503)
> >     at
> >
> >
> kafka.controller.KafkaController.initializeControllerContext(KafkaController.scala:467)
> >     at
> >
> >
> kafka.controller.KafkaController.onControllerFailover(KafkaController.scala:215)
> >     at
> >
> >
> kafka.controller.KafkaController$$anonfun$1.apply$mcV$sp(KafkaController.scala:89)
> >     at
> >
> kafka.server.ZookeeperLeaderElector.elect(ZookeeperLeaderElector.scala:53)
> >     at
> >
> >
> kafka.server.ZookeeperLeaderElector.startup(ZookeeperLeaderElector.scala:43)
> >     at
> kafka.controller.KafkaController.startup(KafkaController.scala:396)
> >     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)
> > [2013-10-28 18:35:03,267] INFO New leader is 0
> > (kafka.server.ZookeeperLeaderElector$LeaderChangeListener)
> > [2013-10-28 18:35:03,273] INFO 0 successfully elected as leader
> > (kafka.server.ZookeeperLeaderElector)
> > [2013-10-28 18:35:03,276] INFO [Kafka Server 0], Started