kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Keylis <vkeylis2...@gmail.com>
Subject Re: kafka.common.LeaderNotAvailableException: No leader for any partition
Date Thu, 30 May 2013 20:33:28 GMT
Your advice is appreciated


On Thu, May 30, 2013 at 1:32 PM, Vadim Keylis <vkeylis2009@gmail.com> wrote:

> Jun.
> I rebuilt kafka this morning by following this steps
>
> > git clone https://git-wip-us.apache.org/repos/asf/kafka.git> cd kafka
> > git checkout -b 0.8 remotes/origin/0.8
> > ./sbt update
> > ./sbt +package
> > ./sbt +assembly-package-dependency
>
>
> deployed to jar files kafka_2.9.2-0.8.0-SNAPSHOT.jar  kafka-assembly-0.8.0-SNAPSHOT-deps.jar.
I used server.properties file that was in config with slight modifications related to zookeeper
since our zookeeper is deployed on separate set of machine.
>
>
> Now I get the following error
>
>
> [2013-05-30 13:25:03,963] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
> [2013-05-30 13:25:03,964] INFO [Socket Server on Broker 1], Started (kafka.network.SocketServer)
> [2013-05-30 13:25:03,971] INFO connecting to ZK: null (kafka.server.KafkaZooKeeper)
> [2013-05-30 13:25:03,984] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
> [2013-05-30 13:25:03,989] INFO Client environment:zookeeper.version=3.3.3-1203054, built
on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:host.name=danalyticspubsub01.tag-dev.com
(org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.version=1.6.0_27 (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.vendor=Sun Microsystems Inc. (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.home=/usr/java/jdk1.6.0_27/jre
(org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.class.path=:/usr/local/kafka/bin/../core/target/scala-2.8.0/*.jar:/usr/local/kafka/bin/../perf/target/scala-2.8.0/kafka*.jar:/usr/local/kafka/bin/../libs/*.jar:/usr/local/kafka/bin/../kafka_2.9.2-0.8.0-SNAPSHOT.jar:/usr/local/kafka/bin/../kafka-assembly-0.8.0-SNAPSHOT-deps.jar
(org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.library.path=/usr/java/jdk1.6.0_27/jre/lib/amd64/server:/usr/java/jdk1.6.0_27/jre/lib/amd64:/usr/java/jdk1.6.0_27/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
(org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:os.version=2.6.18-164.15.1.el5 (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:user.name=kafka (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:user.home=/home/kafka (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,989] INFO Client environment:user.dir=/usr/local/kafka (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,990] INFO Initiating client connection, connectString=null sessionTimeout=6000
watcher=org.I0Itec.zkclient.ZkClient@69236cd5 (org.apache.zookeeper.ZooKeeper)
> [2013-05-30 13:25:03,994] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
> [2013-05-30 13:25:03,996] FATAL Fatal error during KafkaServerStable startup. Prepare
to shutdown (kafka.server.KafkaServerStartable)
> java.lang.NullPointerException
>         at org.apache.zookeeper.ClientCnxn.<init>(ClientCnxn.java:361)
>         at org.apache.zookeeper.ClientCnxn.<init>(ClientCnxn.java:332)
>         at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:383)
>         at org.I0Itec.zkclient.ZkConnection.connect(ZkConnection.java:64)
>         at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:872)
>         at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:98)
>         at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:84)
>         at kafka.common.KafkaZookeeperClient$.getZookeeperClient(KafkaZookeperClient.scala:31)
>         at kafka.server.KafkaZooKeeper.startup(KafkaZooKeeper.scala:39)
>         at kafka.server.KafkaServer.startup(KafkaServer.scala:78)
>         at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)
>         at kafka.Kafka$.main(Kafka.scala:46)
>         at kafka.Kafka.main(Kafka.scala)
> [2013-05-30 13:25:03,997] INFO [Kafka Server 1], shutting down (kafka.server.KafkaServer)
> [2013-05-30 13:25:03,999] INFO [Socket Server on Broker 1], Shutting down (kafka.network.SocketServer)
> [2013-05-30 13:25:04,005] INFO [Socket Server on Broker 1], Shutdown completed (kafka.network.SocketServer)
> [2013-05-30 13:25:04,007] INFO Shutdown Kafka scheduler (kafka.utils.KafkaScheduler)
> [2013-05-30 13:25:04,082] INFO [Kafka Server 1], shut down completed (kafka.server.KafkaServer)
> [2013-05-30 13:25:04,083] INFO [Kafka Server 1], shutting down (kafka.server.KafkaServer)
>
>
>
>
> On Thu, May 30, 2013 at 8:14 AM, Jun Rao <junrao@gmail.com> wrote:
>
>> Are you using the latest code from the 0.8 branch? Any exception/error in
>> the broker log (including state-change.log)?
>>
>> Thanks,
>>
>> Jun
>>
>>
>> On Wed, May 29, 2013 at 10:49 PM, Vadim Keylis <vkeylis2009@gmail.com
>> >wrote:
>>
>> > I am working on deploying Kafka 0.8 to our test cluster that consist of
>> 2
>> > kafka servers and 2 zookeper nodes.
>> > I created topic using the following command
>> >
>> >  bin/kafka-topics.sh --create --topic junit1_analytics_data_log
>> --zookeeper
>> > danalyticspubsubzoo02:2181 --partitions=36  --replication-factor=2
>> >
>> > After using producer to post messages to the topic I am getting the
>> > following error. Can someone please advise?
>> > [2013-05-29 17:36:46,775] WARN Error while fetching metadata
>> > PartitionMetadata(29,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,29]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,775] WARN Error while fetching metadata
>> > PartitionMetadata(30,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,30]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,775] WARN Error while fetching metadata
>> > PartitionMetadata(31,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,31]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,776] WARN Error while fetching metadata
>> > PartitionMetadata(32,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,32]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,776] WARN Error while fetching metadata
>> > PartitionMetadata(33,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,33]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,776] WARN Error while fetching metadata
>> > PartitionMetadata(34,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,34]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,777] WARN Error while fetching metadata
>> > PartitionMetadata(35,None,Vector(),Vector(),5) for topic partition
>> > [junit1_analytics_data_log,35]: [class
>> > kafka.common.LeaderNotAvailableException]
>> > (kafka.producer.BrokerPartitionInfo)
>> > [2013-05-29 17:36:46,777] WARN Failed to collate messages by
>> > topic,partition due to (kafka.producer.async.DefaultEventHandler)
>> > kafka.common.LeaderNotAvailableException: No leader for any partition
>> >         at
>> >
>> >
>> kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHandler$$getPartition(DefaultEventHandler.scala:212)
>> >         at
>> >
>> >
>> kafka.producer.async.DefaultEventHandler$$anonfun$partitionAndCollate$1.apply(DefaultEventHandler.scala:150)
>> >         at
>> >
>> >
>> kafka.producer.async.DefaultEventHandler$$anonfun$partitionAndCollate$1.apply(DefaultEventHandler.scala:148)
>> >         at
>> >
>> >
>> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:60)
>> >         at
>> > scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
>> >         at
>> >
>> >
>> kafka.producer.async.DefaultEventHandler.partitionAndCollate(DefaultEventHandler.scala:148)
>> >         at
>> >
>> >
>> kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEventHandler.scala:94)
>> >         at
>> >
>> >
>> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:72)
>> >         at kafka.producer.Producer.send(Producer.scala:74)
>> >         at
>> kafka.producer.ConsoleProducer$.main(ConsoleProducer.scala:159)
>> >         at kafka.producer.ConsoleProducer.main(ConsoleProducer.scala)
>> > [2013-05-29 17:36:46,880] INFO Fetching metadata with correlation id 6
>> for
>> > 1 topic(s) Set(junit1_analytics_data_log) (kafka.client.ClientUtils$)
>> > [2013-05-29 17:36:46,881] INFO Connected to localhost:9092 for producing
>> > (kafka.producer.SyncProducer)
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message