Rob, Are you saying that LeaderNotAvailableException happens only once and then disappears? That is normal and is different from what happens in KAFKA-876.
Thanks, Jun On Thu, Apr 25, 2013 at 8:41 PM, Withers, Robert <robert.with...@dish.com>wrote: > This LeaderNotAvailableException only occurs once now, running kafka 8 > from a dos shell. We are following KAFKA-876 closely which we also > experience. > > thanks! > rob > ________________________________________ > From: Withers, Robert > Sent: Friday, April 19, 2013 6:38 AM > To: users@kafka.apache.org > Subject: RE: LeaderNotAvailableException: reventing the running of > kafka-console-producer.bat > > Hi Jun, > > It seems I failed to respond to this post. My apologies. I did test a > week ago, with the latest 0.8 and it still failed. The reason I did wait > so long is to get my home machine setup, which I finished today. At work > we are tearing it up and leaving behind issues so we can get message > traffic over kafka-0.7.2 into storm. We got this working yesterday > afternoon..yay! > > I git cloned kafka (with EGit) and then sbt.bat update and sbt.bat package. > > Here is git log results: > commit 9ff4e8eb10e0ddd86f257e99d55971a132426605 > Author: Jay Kreps <jay.kr...@gmail.com> > Date: Tue Mar 12 11:17:12 2013 -0700 > > KAFKA-739 Handle null message payloads in messages and in the log > cleaner. R > > commit c1ed12e44ddebe41dc464683e3d7eeb4e6d39a45 > Author: Jay Kreps <jay.kr...@gmail.com> > Date: Fri Mar 8 15:07:39 2013 -0800 > > KAFKA-554 Dynamic per-topic configuration. This patch adds a mechanism > for s > > commit 4f2742d60d16f5ba468aa66d2c3ed7aa37479dce > Merge: 82b11aa 92ecebe > Author: Jun Rao <jun...@gmail.com> > Date: Sun Mar 3 20:20:41 2013 -0800 > > merge from 0.8 and resolve conflicts > > This problem still persists, unfortunately, running > kafka-console-consumer.bat and kafka-console-producer.bat. > > Best, > rob > > ________________________________________ > From: Jun Rao [jun...@gmail.com] > Sent: Sunday, April 07, 2013 10:59 PM > To: users@kafka.apache.org > Subject: Re: LeaderNotAvailableException: reventing the running of > kafka-console-producer.bat > > That hash tag points to a commit on Apr 4 and is probably not what you > have. Try "git log" on the checkout that builds your binary. If you can't > figure this out, could you try the latest code in the 0.8 branch and see if > the problem still exists? > > Thanks, > > Jun > > > On Sat, Apr 6, 2013 at 10:36 AM, Withers, Robert <robert.with...@dish.com > >wrote: > > > I am not entirely sure as it has been about a year since I used git. > > Looking in .git\refs\heads\0.8, I have > > afecc9f23108b100b27017974b132331d6bab8e6. .git\HEAD says ref: > > refs/heads/0.8. > > > > If this is not what you need, tell me how I can get you the right info. > > > > Thanks, > > Rob > > > > > > ________________________________________ > > From: Jun Rao [jun...@gmail.com] > > Sent: Friday, April 05, 2013 10:10 PM > > To: users@kafka.apache.org > > Subject: Re: LeaderNotAvailableException: reventing the running of > > kafka-console-producer.bat > > > > The following is the problem. The broker fails to become the leader. Do > you > > know the revision of the code you are using so that we know the exact > line > > that's causing the problem? > > > > Thanks, > > > > Jun > > > > [2013-04-05 10:21:09,660] ERROR Replica Manager on Broker 0: Error > > processing le > > aderAndISR request Name: LeaderAndIsrRequest; Version: 0; CorrelationId: > 7; > > Clie > > ntId: ; AckTimeoutMs: 1000 ms; ControllerEpoch: 1; PartitionStateInfo: > > (test,0) > > -> PartitionStateInfo(LeaderIsrAndControllerEpoch({ "ISR":"0", > > "leader":"0", "le > > aderEpoch":"0" },1),1); Leaders: > > id:0,host:MERD7-178041.echostar.com<http://merd7-178041.echostar.com/ > > >,port:9092 > > ( > > kafka.server.ReplicaManager) > > java.util.NoSuchElementException: key not found: \tmp\kafka-logs > > at scala.collection.MapLike$class.default(MapLike.scala:223) > > at scala.collection.immutable.Map$Map1.default(Map.scala:93) > > at scala.collection.MapLike$class.apply(MapLike.scala:134) > > at scala.collection.immutable.Map$Map1.apply(Map.scala:93) > > at kafka.cluster.Partition.getOrCreateReplica(Partition.scala:81) > > at kafka.cluster.Partition$$anonfun$2.apply(Partition.scala:145) > > at kafka.cluster.Partition$$anonfun$2.apply(Partition.scala:145) > > > > > > On Fri, Apr 5, 2013 at 9:35 AM, Withers, Robert <robert.with...@dish.com > > >wrote: > > > > > I deleted all ZK and Kafka data and reran the ZK and one server. I got > > > some log traffic at this point. It looks like the server is elected > > > Leader. The ZK is on port 2181 and the server is on port 9092. > > > > > > [2013-04-05 10:17:35,523] INFO 0 successfully elected as leader > > > (kafka.server.Zo > > > okeeperLeaderElector) > > > [2013-04-05 10:17:35,623] INFO New leader is 0 > > > (kafka.server.ZookeeperLeaderElec > > > tor$LeaderChangeListener) > > > > > > In ZK: > > > [2013-04-05 10:17:35,131] INFO Got user-level KeeperException when > > > processing se > > > ssionid:0x13ddafd0fc40000 type:create cxid:0x4 zxid:0xfffffffffffffffe > > > txntype:u > > > nknown reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode > for > > > /broke > > > rs (org.apache.zookeeper.server.PrepRequestProcessor) > > > [2013-04-05 10:17:35,238] INFO Got user-level KeeperException when > > > processing se > > > ssionid:0x13ddafd0fc40000 type:create cxid:0xa zxid:0xfffffffffffffffe > > > txntype:u > > > nknown reqpath:n/a Error Path:/config Error:KeeperErrorCode = NoNode > for > > > /config > > > (org.apache.zookeeper.server.PrepRequestProcessor) > > > [2013-04-05 10:17:35,528] INFO Got user-level KeeperException when > > > processing se > > > ssionid:0x13ddafd0fc40000 type:setData cxid:0x15 > zxid:0xfffffffffffffffe > > > txntype > > > :unknown reqpath:n/a Error Path:/controller_epoch > Error:KeeperErrorCode = > > > NoNode > > > for /controller_epoch > (org.apache.zookeeper.server.PrepRequestProcessor) > > > > > > In server: > > > [2013-04-05 10:17:34,983] INFO Client > > > environment:java.io.tmpdir=C:\Users\ROBERT > > > ~1.WIT\AppData\Local\Temp\ (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:17:34,983] INFO Client environment:java.compiler=<NA> > > > (org.apache > > > .zookeeper.ZooKeeper) > > > [2013-04-05 10:17:34,988] INFO Client environment:os.name=Windows 7 > > > (org.apache. > > > zookeeper.ZooKeeper) > > > [2013-04-05 10:17:34,988] INFO Client environment:os.arch=amd64 > > > (org.apache.zook > > > eeper.ZooKeeper) > > > [2013-04-05 10:17:34,989] INFO Client environment:os.version=6.1 > > > (org.apache.zoo > > > keeper.ZooKeeper) > > > [2013-04-05 10:17:34,993] INFO Client environment:user.name > > =Robert.Withers > > > (org. > > > apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:17:34,994] INFO Client > > > environment:user.home=C:\Users\Robert.With > > > ers (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:17:34,994] INFO Client > > > environment:user.dir=C:\Users\Robert.Withe > > > rs\kafka-trunk\bin (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:17:34,999] INFO Initiating client connection, > > > connectString=local > > > host:2181 sessionTimeout=6000 > > watcher=org.I0Itec.zkclient.ZkClient@5da33470(org > > > .apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:17:35,012] INFO Opening socket connection to server > > > localhost/127 > > > .0.0.1:2181 (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:17:35,014] INFO Socket connection established to > > > localhost/127.0. > > > 0.1:2181, initiating session (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:17:35,082] INFO Session establishment complete on server > > > localhos > > > t/127.0.0.1:2181, sessionid = 0x13ddafd0fc40000, negotiated timeout = > > > 6000 (org. > > > apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:17:35,085] INFO zookeeper state changed (SyncConnected) > > > (org.I0It > > > ec.zkclient.ZkClient) > > > [2013-04-05 10:17:35,405] INFO Log directory 'C:\tmp\kafka-logs' not > > > found, crea > > > ting it. (kafka.log.LogManager) > > > [2013-04-05 10:17:35,410] INFO Starting log cleanup with a period of > > > 300000 ms. > > > (kafka.log.LogManager) > > > [2013-04-05 10:17:35,413] INFO Starting log flusher with a default > period > > > of 300 > > > 0 ms. (kafka.log.LogManager) > > > [2013-04-05 10:17:35,429] INFO Awaiting socket connections on > > 0.0.0.0:9092. > > > (kaf > > > ka.network.Acceptor) > > > [2013-04-05 10:17:35,430] INFO [Socket Server on Broker 0], started > > > (kafka.netwo > > > rk.SocketServer) > > > [2013-04-05 10:17:35,477] INFO Will not load MX4J, mx4j-tools.jar is > not > > > in the > > > classpath (kafka.utils.Mx4jLoader$) > > > [2013-04-05 10:17:35,523] INFO 0 successfully elected as leader > > > (kafka.server.Zo > > > okeeperLeaderElector) > > > [2013-04-05 10:17:35,623] INFO New leader is 0 > > > (kafka.server.ZookeeperLeaderElec > > > tor$LeaderChangeListener) > > > [2013-04-05 10:17:35,654] INFO Registered broker 0 at path > /brokers/ids/0 > > > with a > > > ddress MERD7-178041.echostar.com:9092. (kafka.utils.ZkUtils$) > > > [2013-04-05 10:17:35,661] INFO [Kafka Server 0], started > > > (kafka.server.KafkaServ > > > er) > > > [2013-04-05 10:17:35,758] INFO No state transitions triggered since no > > > partition > > > s are assigned to brokers 0 (kafka.utils.ZkUtils$) > > > > > > > > > > > > > > > > > > When I ran the console-producer (kafka-console-producer.bat > --broker-list > > > localhost:9092 --topic test), and sent "hello world", I got the > following > > > logs: > > > > > > In ZK: > > > [2013-04-05 10:21:09,458] INFO Got user-level KeeperException when > > > processing se > > > ssionid:0x13ddafd0fc40000 type:create cxid:0x3e zxid:0xfffffffffffffffe > > > txntype: > > > unknown reqpath:n/a Error Path:/brokers/topics/test/partitions/0 > > > Error:KeeperErr > > > orCode = NoNode for /brokers/topics/test/partitions/0 > > > (org.apache.zookeeper.serv > > > er.PrepRequestProcessor) > > > [2013-04-05 10:21:09,497] INFO Got user-level KeeperException when > > > processing se > > > ssionid:0x13ddafd0fc40000 type:create cxid:0x3f zxid:0xfffffffffffffffe > > > txntype: > > > unknown reqpath:n/a Error Path:/brokers/topics/test/partitions > > > Error:KeeperError > > > Code = NoNode for /brokers/topics/test/partitions > > > (org.apache.zookeeper.server.P > > > repRequestProcessor) > > > > > > > > > In server: > > > [2013-04-05 10:21:09,431] INFO [KafkaApi-0] Auto creation of topic test > > > with 1 p > > > artitions and replication factor 1 is successful! > > (kafka.server.KafkaApis) > > > [2013-04-05 10:21:09,447] ERROR Error while fetching metadata for > > > partition [tes > > > t,0] (kafka.admin.AdminUtils$) > > > kafka.common.LeaderNotAvailableException: Leader not available for > topic > > > test pa > > > rtition 0 > > > at > kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:217) > > > at > kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:200) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized. > > > scala:61) > > > at scala.collection.immutable.List.foreach(List.scala:45) > > > at > > > scala.collection.TraversableLike$class.map(TraversableLike.scala:206) > > > > > > at scala.collection.immutable.List.map(List.scala:45) > > > at > > > kafka.admin.AdminUtils$.kafka$admin$AdminUtils$$fetchTopicMetadataFro > > > mZk(AdminUtils.scala:200) > > > at > > > kafka.admin.AdminUtils$.fetchTopicMetadataFromZk(AdminUtils.scala:189 > > > ) > > > at > > > kafka.server.KafkaApis$$anonfun$handleTopicMetadataRequest$1.apply(Ka > > > fkaApis.scala:452) > > > at > > > kafka.server.KafkaApis$$anonfun$handleTopicMetadataRequest$1.apply(Ka > > > fkaApis.scala:438) > > > at scala.collection.immutable.Set$Set1.foreach(Set.scala:81) > > > at > > > kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:437 > > > ) > > > at kafka.server.KafkaApis.handle(KafkaApis.scala:67) > > > at > > > kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:41) > > > at java.lang.Thread.run(Thread.java:722) > > > Caused by: kafka.common.LeaderNotAvailableException: No leader exists > for > > > partit > > > ion 0 > > > at > kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:214) > > > ... 16 more > > > [2013-04-05 10:21:09,481] INFO Closing socket connection to /127.0.0.1 > . > > > (kafka.n > > > etwork.Processor) > > > [2013-04-05 10:21:09,622] INFO Replica Manager on Broker 0: Handling > > > leader and > > > isr request Name: LeaderAndIsrRequest; Version: 0; CorrelationId: 7; > > > ClientId: ; > > > AckTimeoutMs: 1000 ms; ControllerEpoch: 1; PartitionStateInfo: > (test,0) > > > -> Part > > > itionStateInfo(LeaderIsrAndControllerEpoch({ "ISR":"0", "leader":"0", > > > "leaderEpo > > > ch":"0" },1),1); Leaders: id:0,host:MERD7-178041.echostar.com > ,port:9092 > > > (kafka.s > > > erver.ReplicaManager) > > > [2013-04-05 10:21:09,624] INFO Replica Manager on Broker 0: Becoming > > > Leader for > > > topic [test] partition [0] (kafka.server.ReplicaManager) > > > [2013-04-05 10:21:09,630] INFO [ReplicaFetcherManager on broker 0] > > > removing fetc > > > her on topic test, partition 0 (kafka.server.ReplicaFetcherManager) > > > [2013-04-05 10:21:09,646] INFO Creating or reloading log segment > > > C:\tmp\kafka-lo > > > gs\test-0\00000000000000000000.log (kafka.log.FileMessageSet) > > > [2013-04-05 10:21:09,651] INFO Loaded index file > > > C:\tmp\kafka-logs\test-0\000000 > > > 00000000000000.index with maxEntries = 1310720, maxIndexSize = > 10485760, > > > entries > > > = 0, lastOffset = 0, file position = 0 (kafka.log.OffsetIndex) > > > [2013-04-05 10:21:09,658] INFO Created log for topic test partition 0 > in > > > C:\tmp\ > > > kafka-logs with properties {segment.index.bytes -> 10485760, > > > file.delete.delay.m > > > s -> 60000, segment.bytes -> 536870912, flush.ms -> 1000, > > > delete.retention.ms -> > > > 86400000, index.interval.bytes -> 4096, retention.bytes -> -1, > > > cleanup.policy - > > > > delete, segment.ms -> 604800000, max.message.bytes -> 1000000, > > > flush.messages > > > -> 10000, min.cleanable.dirty.ratio -> 0.5, retention.ms -> > 604800000}. > > > (kafka.l > > > og.LogManager) > > > [2013-04-05 10:21:09,660] ERROR Replica Manager on Broker 0: Error > > > processing le > > > aderAndISR request Name: LeaderAndIsrRequest; Version: 0; > CorrelationId: > > > 7; Clie > > > ntId: ; AckTimeoutMs: 1000 ms; ControllerEpoch: 1; PartitionStateInfo: > > > (test,0) > > > -> PartitionStateInfo(LeaderIsrAndControllerEpoch({ "ISR":"0", > > > "leader":"0", "le > > > aderEpoch":"0" },1),1); Leaders: id:0,host:MERD7-178041.echostar.com > > ,port:9092 > > > ( > > > kafka.server.ReplicaManager) > > > java.util.NoSuchElementException: key not found: \tmp\kafka-logs > > > at scala.collection.MapLike$class.default(MapLike.scala:223) > > > at scala.collection.immutable.Map$Map1.default(Map.scala:93) > > > at scala.collection.MapLike$class.apply(MapLike.scala:134) > > > at scala.collection.immutable.Map$Map1.apply(Map.scala:93) > > > at > kafka.cluster.Partition.getOrCreateReplica(Partition.scala:81) > > > at > kafka.cluster.Partition$$anonfun$2.apply(Partition.scala:145) > > > at > kafka.cluster.Partition$$anonfun$2.apply(Partition.scala:145) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized. > > > scala:61) > > > at scala.collection.immutable.List.foreach(List.scala:45) > > > at > > > scala.collection.TraversableLike$class.map(TraversableLike.scala:206) > > > > > > at scala.collection.immutable.List.map(List.scala:45) > > > at kafka.cluster.Partition.makeLeader(Partition.scala:145) > > > at > > > kafka.server.ReplicaManager.kafka$server$ReplicaManager$$makeLeader(R > > > eplicaManager.scala:234) > > > at > > > kafka.server.ReplicaManager$$anonfun$becomeLeaderOrFollower$3.apply(R > > > eplicaManager.scala:208) > > > at > > > kafka.server.ReplicaManager$$anonfun$becomeLeaderOrFollower$3.apply(R > > > eplicaManager.scala:200) > > > at scala.collection.immutable.Map$Map1.foreach(Map.scala:105) > > > at > > > kafka.server.ReplicaManager.becomeLeaderOrFollower(ReplicaManager.sca > > > la:200) > > > at > > > kafka.server.KafkaApis.handleLeaderAndIsrRequest(KafkaApis.scala:85) > > > at kafka.server.KafkaApis.handle(KafkaApis.scala:68) > > > at > > > kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:41) > > > at java.lang.Thread.run(Thread.java:722) > > > [2013-04-05 10:21:09,673] INFO Replica Manager on Broker 0: Completed > > > leader and > > > isr request Name: LeaderAndIsrRequest; Version: 0; CorrelationId: 7; > > > ClientId: > > > ; AckTimeoutMs: 1000 ms; ControllerEpoch: 1; PartitionStateInfo: > (test,0) > > > -> Par > > > titionStateInfo(LeaderIsrAndControllerEpoch({ "ISR":"0", "leader":"0", > > > "leaderEp > > > och":"0" },1),1); Leaders: id:0,host:MERD7-178041.echostar.com > ,port:9092 > > > (kafka. > > > server.ReplicaManager) > > > [2013-04-05 10:21:09,685] INFO Closing socket connection to /127.0.0.1 > . > > > (kafka.n > > > etwork.Processor) > > > [2013-04-05 10:21:09,702] ERROR [KafkaApi-0] Error processing > > > ProducerRequest wi > > > th correlation id 4 from client on test:0 (kafka.server.KafkaApis) > > > kafka.common.LeaderNotAvailableException: Leader not local for topic > test > > > partit > > > ion 0 on broker 0 > > > at > > > kafka.server.ReplicaManager.getLeaderReplicaIfLocal(ReplicaManager.sc > > > ala:177) > > > at > > > kafka.server.KafkaApis$$anonfun$appendToLocalLog$2.apply(KafkaApis.sc > > > ala:197) > > > at > > > kafka.server.KafkaApis$$anonfun$appendToLocalLog$2.apply(KafkaApis.sc > > > ala:192) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.sca > > > la:80) > > > at > > > scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.sca > > > la:80) > > > at scala.collection.Iterator$class.foreach(Iterator.scala:631) > > > at > > > scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:16 > > > 1) > > > at > > > scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala > > > :194) > > > at > > scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39) > > > at scala.collection.mutable.HashMap.foreach(HashMap.scala:80) > > > at > > > scala.collection.TraversableLike$class.map(TraversableLike.scala:206) > > > > > > at scala.collection.mutable.HashMap.map(HashMap.scala:39) > > > at kafka.server.KafkaApis.appendToLocalLog(KafkaApis.scala:192) > > > at > > > kafka.server.KafkaApis.handleProducerRequest(KafkaApis.scala:126) > > > at kafka.server.KafkaApis.handle(KafkaApis.scala:64) > > > at > > > kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:41) > > > at java.lang.Thread.run(Thread.java:722) > > > > > > > > > and finally in the console-producer: > > > hello > > > [2013-04-05 10:21:09,360] INFO Fetching metadata with correlation id 0 > > for > > > 1 top > > > ic(s) Set(test) (kafka.client.ClientUtils$) > > > [2013-04-05 10:21:09,364] INFO Connected to localhost:9092 for > producing > > > (kafka. > > > producer.SyncProducer) > > > [2013-04-05 10:21:09,480] INFO Disconnecting from localhost:9092 > > > (kafka.producer > > > .SyncProducer) > > > [2013-04-05 10:21:09,492] WARN Error while fetching metadata for topic > > > partition > > > [test,0]: [PartitionMetadata(0,None,Vector(),Vector(),5)] > > > (kafka.producer.Broke > > > rPartitionInfo) > > > kafka.common.LeaderNotAvailableException > > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > Method) > > > > > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct > > > orAccessorImpl.java:57) > > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC > > > onstructorAccessorImpl.java:45) > > > at > > java.lang.reflect.Constructor.newInstance(Constructor.java:525) > > > at java.lang.Class.newInstance0(Class.java:374) > > > at java.lang.Class.newInstance(Class.java:327) > > > at > kafka.common.ErrorMapping$.exceptionFor(ErrorMapping.scala:72) > > > at > > > kafka.producer.BrokerPartitionInfo$$anonfun$updateInfo$1$$anonfun$app > > > ly$6$$anonfun$apply$8.apply(BrokerPartitionInfo.scala:87) > > > at > > > kafka.producer.BrokerPartitionInfo$$anonfun$updateInfo$1$$anonfun$app > > > ly$6$$anonfun$apply$8.apply(BrokerPartitionInfo.scala:87) > > > at kafka.utils.Logging$class.warn(Logging.scala:89) > > > at > > > kafka.producer.BrokerPartitionInfo.warn(BrokerPartitionInfo.scala:27) > > > > > > at > > > kafka.producer.BrokerPartitionInfo$$anonfun$updateInfo$1$$anonfun$app > > > ly$6.apply(BrokerPartitionInfo.scala:86) > > > at > > > kafka.producer.BrokerPartitionInfo$$anonfun$updateInfo$1$$anonfun$app > > > ly$6.apply(BrokerPartitionInfo.scala:84) > > > at > > > scala.collection.mutable.ResizableArray$class.foreach(ResizableArray. > > > scala:57) > > > at > > > scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43) > > > at > > > kafka.producer.BrokerPartitionInfo$$anonfun$updateInfo$1.apply(Broker > > > PartitionInfo.scala:84) > > > at > > > kafka.producer.BrokerPartitionInfo$$anonfun$updateInfo$1.apply(Broker > > > PartitionInfo.scala:78) > > > at scala.collection.Iterator$class.foreach(Iterator.scala:631) > > > at > > > scala.collection.immutable.VectorIterator.foreach(Vector.scala:605) > > > at > > > scala.collection.IterableLike$class.foreach(IterableLike.scala:79) > > > at scala.collection.immutable.Vector.foreach(Vector.scala:36) > > > at > > > kafka.producer.BrokerPartitionInfo.updateInfo(BrokerPartitionInfo.sca > > > la:78) > > > at > > > kafka.producer.async.DefaultEventHandler$$anonfun$handle$1.apply$mcV$ > > > sp(DefaultEventHandler.scala:68) > > > at kafka.utils.Utils$.swallow(Utils.scala:165) > > > at kafka.utils.Logging$class.swallowError(Logging.scala:106) > > > at kafka.utils.Utils$.swallowError(Utils.scala:44) > > > at > > > kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.s > > > cala:68) > > > at > > > kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThrea > > > d.scala:104) > > > at > > > kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.appl > > > y(ProducerSendThread.scala:87) > > > at > > > kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.appl > > > y(ProducerSendThread.scala:67) > > > at scala.collection.immutable.Stream.foreach(Stream.scala:254) > > > at > > > kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThr > > > ead.scala:66) > > > at > > > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala: > > > 44) > > > [2013-04-05 10:21:09,530] 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$Default > > > EventHandler$$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:57) > > > at > > > scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43) > > > at > > > kafka.producer.async.DefaultEventHandler.partitionAndCollate(DefaultE > > > ventHandler.scala:148) > > > at > > > kafka.producer.async.DefaultEventHandler.dispatchSerializedData(Defau > > > ltEventHandler.scala:94) > > > at > > > kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.s > > > cala:72) > > > at > > > kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThrea > > > d.scala:104) > > > at > > > kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.appl > > > y(ProducerSendThread.scala:87) > > > at > > > kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.appl > > > y(ProducerSendThread.scala:67) > > > at scala.collection.immutable.Stream.foreach(Stream.scala:254) > > > at > > > kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThr > > > ead.scala:66) > > > at > > > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala: > > > 44) > > > [2013-04-05 10:21:09,647] INFO Fetching metadata with correlation id 2 > > for > > > 1 top > > > ic(s) Set(test) (kafka.client.ClientUtils$) > > > [2013-04-05 10:21:09,648] INFO Connected to localhost:9092 for > producing > > > (kafka. > > > producer.SyncProducer) > > > [2013-04-05 10:21:09,684] INFO Disconnecting from localhost:9092 > > > (kafka.producer > > > .SyncProducer) > > > [2013-04-05 10:21:09,698] INFO Connected to > > MERD7-178041.echostar.com:9092for p > > > roducing (kafka.producer.SyncProducer) > > > > > > > > > > > > Subsequent sends had no errors in the console-producer log, but there > > > continued to be LeaderNotAvailableExceptions in the server log. > > > > > > [2013-04-05 10:23:56,189] ERROR [KafkaApi-0] Error processing > > > ProducerRequest wi > > > th correlation id 6 from client on test:0 (kafka.server.KafkaApis) > > > kafka.common.LeaderNotAvailableException: Leader not local for topic > test > > > partit > > > ion 0 on broker 0 > > > > > > > > > When I restart the console-producer, and send more strings, the same > > > occurs, no error in the console-producer log, but > > > LeaderNoAvailableExceptions in the server log. > > > > > > > > > Then, when I start the console-consumer (kafka-console-consumer.bat > > > --zookeeper localhost:2181 --topic test), I get > > > LeaderNotAvailableExceptions in both the server log and the > > > console-consumer log: > > > > > > Server log: > > > [2013-04-05 10:32:08,108] WARN [KafkaApi-0] Error while responding to > > > offset req > > > uest (kafka.server.KafkaApis) > > > kafka.common.LeaderNotAvailableException: Leader not local for topic > test > > > partit > > > ion 0 on broker 0 > > > at > > > kafka.server.ReplicaManager.getLeaderReplicaIfLocal(ReplicaManager.sc > > > ala:177) > > > at > kafka.server.KafkaApis$$anonfun$14.apply(KafkaApis.scala:341) > > > at > kafka.server.KafkaApis$$anonfun$14.apply(KafkaApis.scala:336) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at > > > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike > > > .scala:206) > > > at scala.collection.immutable.Map$Map1.foreach(Map.scala:105) > > > at > > > scala.collection.TraversableLike$class.map(TraversableLike.scala:206) > > > > > > at scala.collection.immutable.Map$Map1.map(Map.scala:93) > > > at > > kafka.server.KafkaApis.handleOffsetRequest(KafkaApis.scala:336) > > > at kafka.server.KafkaApis.handle(KafkaApis.scala:66) > > > at > > > kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:41) > > > at java.lang.Thread.run(Thread.java:722) > > > > > > console-consumer log: > > > [2013-04-05 10:32:07,344] INFO Verifying properties > > > (kafka.utils.VerifiablePrope > > > rties) > > > [2013-04-05 10:32:07,372] INFO Property auto.commit.enable is > overridden > > > to true > > > (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,372] INFO Property auto.commit.interval.ms is > > > overridden to > > > 10000 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,372] INFO Property auto.offset.reset is overridden > > to > > > large > > > st (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,373] INFO Property consumer.timeout.ms is > > overridden > > > to -1 > > > (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,373] INFO Property fetch.message.max.bytes is > > > overridden to > > > 1048576 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,373] INFO Property fetch.min.bytes is overridden > to > > 1 > > > (kafk > > > a.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,373] INFO Property fetch.wait.max.ms is > overridden > > > to 100 ( > > > kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,373] INFO Property group.id is overridden to > > > console-consum > > > er-12815 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,374] INFO Property socket.receive.buffer.bytes is > > > overridde > > > n to 2097152 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,374] INFO Property socket.timeout.ms is > overridden > > > to 30000 > > > (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,374] INFO Property zk.connect is overridden to > > > localhost:21 > > > 81 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,384] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Connecting to zookeeper instance at localhost:2181 > > > (kafka.consumer. > > > ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,391] INFO Starting ZkClient event thread. > > > (org.I0Itec.zkcli > > > ent.ZkEventThread) > > > [2013-04-05 10:32:07,396] INFO Client > > > environment:zookeeper.version=3.3.3-120305 > > > 4, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,396] INFO Client environment:host.name > > > =MERD7-178041.echosta > > > r.com (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,397] INFO Client environment:java.version=1.7.0_17 > > > (org.apa > > > che.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,397] INFO Client environment:java.vendor=Oracle > > > Corporation > > > (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,397] INFO Client > > > environment:java.home=D:\dish\software\Jav > > > a\jdk1.7.0_17\jre (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,397] INFO Client > > > environment:java.class.path=C:\Users\Rober > > > > > > > > > t.Withers\.ivy2\cache/org.xerial.snappy/snappy-java/bundles/snappy-java-1.0.4.1. > > > > > > > > > jar;C:\Users\Robert.Withers\.ivy2\cache/org.scala-lang/scala-library/jars/scala- > > > > > > > > > library-2.8.0.jar;C:\Users\Robert.Withers\.ivy2\cache/org.scala-lang/scala-compi > > > > > > > > > ler/jars/scala-compiler-2.8.0.jar;C:\Users\Robert.Withers\.ivy2\cache/log4j/log4 > > > > > > > > > j/jars/log4j-1.2.15.jar;C:\Users\Robert.Withers\.ivy2\cache/org.slf4j/slf4j-api/ > > > > > > > > > jars/slf4j-api-1.6.4.jar;C:\Users\Robert.Withers\.ivy2\cache/org.apache.zookeepe > > > > > > > > > r/zookeeper/jars/zookeeper-3.3.4.jar;C:\Users\Robert.Withers\.ivy2\cache/net.sf. > > > > > > > > > jopt-simple/jopt-simple/jars/jopt-simple-3.2.jar;C:\Users\Robert.Withers\kafka-t > > > > > > > > > runk\core\target\scala-2.8.0\kafka_2.8.0-0.8-SNAPSHOT.jar;C:\Users\Robert.Wither > > > > > > > > > s\kafka-trunk\core\lib\metrics-annotation-3.0.0-c0c8be71.jar;C:\Users\Robert.Wit > > > > > > > > > hers\kafka-trunk\core\lib\metrics-core-3.0.0-c0c8be71.jar;C:\Users\Robert.Wither > > > > > > > > > s\kafka-trunk\core\lib\zkclient-20120522.jar;C:\Users\Robert.Withers\kafka-trunk > > > \perf\target\kafka-perf_2.8.0-0.8-SNAPSHOT.jar > > > (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,398] INFO Client > > > environment:java.library.path=D:\dish\soft > > > > > > > > > ware\Java\jdk1.7.0_17\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows > > > ;C:\Users\Robert.Withers\kafka-trunk\bin\windows;C:\Program Files > > > (x86)\Haskell\ > > > bin;D:\dish\software\Haskell > > > Platform\2012.4.0.0\lib\extralibs\bin;D:\dish\softw > > > are\Haskell > > > Platform\2012.4.0.0\bin;C:\Windows\system32;C:\Windows;C:\Windows\Sy > > > > > > > > > stem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\PROGRA~1\CONDUS~1\DIS > > > KEE~1\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program > > > Files (x86 > > > )\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program > > > Files (x86 > > > )\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL > > > Server\100 > > > \Tools\Binn\;C:\Program Files (x86)\Microsoft SQL > > > Server\100\DTS\Binn\;C:\Progra > > > m Files (x86)\Microsoft Visual Studio > > > 9.0\Common7\IDE\PrivateAssemblies\;C:\Prog > > > ram Files\TortoiseSVN\bin;D:\dish\software\Haskell > > > Platform\2012.4.0.0\mingw\bin > > > ;D:\dish\software\Java\jdk1.7.0_17\bin;. > (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,407] INFO Client > > > environment:java.io.tmpdir=C:\Users\ROBERT > > > ~1.WIT\AppData\Local\Temp\ (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,408] INFO Client environment:java.compiler=<NA> > > > (org.apache > > > .zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,408] INFO Client environment:os.name=Windows 7 > > > (org.apache. > > > zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,412] INFO Client environment:os.arch=amd64 > > > (org.apache.zook > > > eeper.ZooKeeper) > > > [2013-04-05 10:32:07,413] INFO Client environment:os.version=6.1 > > > (org.apache.zoo > > > keeper.ZooKeeper) > > > [2013-04-05 10:32:07,413] INFO Client environment:user.name > > =Robert.Withers > > > (org. > > > apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,417] INFO Client > > > environment:user.home=C:\Users\Robert.With > > > ers (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,418] INFO Client > > > environment:user.dir=C:\Users\Robert.Withe > > > rs\kafka-trunk\bin (org.apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,418] INFO Initiating client connection, > > > connectString=local > > > host:2181 sessionTimeout=6000 > > watcher=org.I0Itec.zkclient.ZkClient@757b7533(org > > > .apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:07,433] INFO Opening socket connection to server > > > localhost/0:0 > > > :0:0:0:0:0:1:2181 (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:32:07,434] INFO Socket connection established to > > > localhost/0:0:0: > > > 0:0:0:0:1:2181, initiating session (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:32:07,469] INFO Session establishment complete on server > > > localhos > > > t/0:0:0:0:0:0:0:1:2181, sessionid = 0x13ddafd0fc40001, negotiated > timeout > > > = 6000 > > > (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:32:07,471] INFO zookeeper state changed (SyncConnected) > > > (org.I0It > > > ec.zkclient.ZkClient) > > > [2013-04-05 10:32:07,490] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba-leader-finder-thread], Starting > > > (kafka.consumer.ConsumerFetcherManag > > > er$$anon$1) > > > [2013-04-05 10:32:07,491] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], starting auto committer every 10000 ms > > > (kafka.consumer.ZookeeperCon > > > sumerConnector) > > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > > > SLF4J: Defaulting to no-operation (NOP) logger implementation > > > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for > > further > > > detail > > > s. > > > [2013-04-05 10:32:07,535] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], begin registering consumer > > > console-consumer-12815_MERD7-178041-1365 > > > 179527383-1da2aeba in ZK (kafka.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,677] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], end registering consumer > > > console-consumer-12815_MERD7-178041-136517 > > > 9527383-1da2aeba in ZK (kafka.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,682] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], starting watcher executor thread for consumer > > > console-consumer-1281 > > > 5_MERD7-178041-1365179527383-1da2aeba > > > (kafka.consumer.ZookeeperConsumerConnector > > > ) > > > [2013-04-05 10:32:07,722] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], begin rebalancing consumer > > > console-consumer-12815_MERD7-178041-1365 > > > 179527383-1da2aeba try #0 (kafka.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,837] INFO Verifying properties > > > (kafka.utils.VerifiablePrope > > > rties) > > > [2013-04-05 10:32:07,838] INFO Property broker.list is overridden to > > > MERD7-17804 > > > 1.echostar.com:9092 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,838] INFO Property client.id is overridden to > > > console-consu > > > mer-12815 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,838] INFO Property request.timeout.ms is > overridden > > > to 3000 > > > 0 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:07,857] INFO Fetching metadata with correlation id 0 > > for > > > 1 top > > > ic(s) Set(test) (kafka.client.ClientUtils$) > > > [2013-04-05 10:32:07,858] INFO Connected to > > MERD7-178041.echostar.com:9092for p > > > roducing (kafka.producer.SyncProducer) > > > [2013-04-05 10:32:07,895] INFO Disconnecting from > > > MERD7-178041.echostar.com:9092 > > > (kafka.producer.SyncProducer) > > > [2013-04-05 10:32:07,901] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Cleared all relevant queues for this fetcher > > > (kafka.consumer.Zookee > > > perConsumerConnector) > > > [2013-04-05 10:32:07,902] INFO Clearing the current data chunk for this > > > consumer > > > iterator (kafka.consumer.ConsumerIterator) > > > [2013-04-05 10:32:07,902] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Cleared the data chunks in all the consumer message > > iterators > > > (kafk > > > a.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,903] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Committing all offsets after clearing the fetcher queues > > > (kafka.con > > > sumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,903] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Releasing partition ownership > > > (kafka.consumer.ZookeeperConsumerConn > > > ector) > > > [2013-04-05 10:32:07,905] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Consumer > > > console-consumer-12815_MERD7-178041-1365179527383-1da2aeba > > > rebalancing the following partitions: ArrayBuffer(0) for topic test > with > > > consum > > > ers: List(console-consumer-12815_MERD7-178041-1365179527383-1da2aeba-0) > > > (kafka.c > > > onsumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:07,906] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], > console-consumer-12815_MERD7-178041-1365179527383-1da2aeba-0 > > > attemp > > > ting to claim partition 0 (kafka.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:08,044] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], > console-consumer-12815_MERD7-178041-1365179527383-1da2aeba-0 > > > succes > > > sfully owned partition 0 for topic test > > > (kafka.consumer.ZookeeperConsumerConnect > > > or) > > > [2013-04-05 10:32:08,045] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Updating the cache > > (kafka.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:08,050] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Consumer > > > console-consumer-12815_MERD7-178041-1365179527383-1da2aeba > > > selected partitions : test:0: fetched offset = -1: consumed offset = > -1 > > > (kafka. > > > consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:08,054] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], end rebalancing consumer > > > console-consumer-12815_MERD7-178041-136517 > > > 9527383-1da2aeba try #0 (kafka.consumer.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:08,058] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], Not creating event watcher for trivial whitelist test > > > (kafka.consum > > > er.ZookeeperConsumerConnector) > > > [2013-04-05 10:32:08,072] INFO Verifying properties > > > (kafka.utils.VerifiablePrope > > > rties) > > > [2013-04-05 10:32:08,073] INFO Property broker.list is overridden to > > > MERD7-17804 > > > 1.echostar.com:9092 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:08,073] INFO Property client.id is overridden to > > > console-consu > > > mer-12815 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:08,073] INFO Property request.timeout.ms is > overridden > > > to 3000 > > > 0 (kafka.utils.VerifiableProperties) > > > [2013-04-05 10:32:08,074] INFO Fetching metadata with correlation id 0 > > for > > > 1 top > > > ic(s) Set(test) (kafka.client.ClientUtils$) > > > [2013-04-05 10:32:08,074] INFO Connected to > > MERD7-178041.echostar.com:9092for p > > > roducing (kafka.producer.SyncProducer) > > > [2013-04-05 10:32:08,092] INFO Disconnecting from > > > MERD7-178041.echostar.com:9092 > > > (kafka.producer.SyncProducer) > > > [2013-04-05 10:32:08,102] INFO > > > [ConsumerFetcherThread-console-consumer-12815_MER > > > D7-178041-1365179527383-1da2aeba-0-0], Starting > > > (kafka.consumer.ConsumerFetcher > > > Thread) > > > [2013-04-05 10:32:08,123] WARN > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba-leader-finder-thread], Failed to add fetcher for [test,0] to > > > broker i > > > d:0,host:MERD7-178041.echostar.com,port:9092 > > > (kafka.consumer.ConsumerFetcherMana > > > ger$$anon$1) > > > kafka.common.LeaderNotAvailableException > > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > Method) > > > > > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct > > > orAccessorImpl.java:57) > > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC > > > onstructorAccessorImpl.java:45) > > > at > > java.lang.reflect.Constructor.newInstance(Constructor.java:525) > > > at java.lang.Class.newInstance0(Class.java:374) > > > at java.lang.Class.newInstance(Class.java:327) > > > at > kafka.common.ErrorMapping$.exceptionFor(ErrorMapping.scala:72) > > > at > > > kafka.consumer.ConsumerFetcherThread.handleOffsetOutOfRange(ConsumerF > > > etcherThread.scala:65) > > > at > > > kafka.server.AbstractFetcherThread.addPartition(AbstractFetcherThread > > > .scala:166) > > > at > > > kafka.server.AbstractFetcherManager.addFetcher(AbstractFetcherManager > > > .scala:48) > > > at > > > kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply > > > (ConsumerFetcherManager.scala:79) > > > at > > > kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply > > > (ConsumerFetcherManager.scala:75) > > > at > > > scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.sca > > > la:80) > > > at > > > scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.sca > > > la:80) > > > at scala.collection.Iterator$class.foreach(Iterator.scala:631) > > > at > > > scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:16 > > > 1) > > > at > > > scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala > > > :194) > > > at > > scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39) > > > at scala.collection.mutable.HashMap.foreach(HashMap.scala:80) > > > at > > > kafka.consumer.ConsumerFetcherManager$$anon$1.doWork(ConsumerFetcherM > > > anager.scala:75) > > > at > > kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51) > > > [2013-04-05 10:32:08,137] INFO > > > [ConsumerFetcherThread-console-consumer-12815_MER > > > D7-178041-1365179527383-1da2aeba-0-0], Shutting down > > > (kafka.consumer.ConsumerFet > > > cherThread) > > > [2013-04-05 10:32:08,137] INFO > > > [ConsumerFetcherThread-console-consumer-12815_MER > > > D7-178041-1365179527383-1da2aeba-0-0], Stopped > > > (kafka.consumer.ConsumerFetcherT > > > hread) > > > [2013-04-05 10:32:08,137] INFO > > > [ConsumerFetcherThread-console-consumer-12815_MER > > > D7-178041-1365179527383-1da2aeba-0-0], Shutdown completed > > > (kafka.consumer.Consum > > > erFetcherThread) > > > [2013-04-05 10:32:08,153] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], ZKConsumerConnector shutting down > > > (kafka.consumer.ZookeeperConsumer > > > Connector) > > > [2013-04-05 10:32:08,154] INFO [ConsumerFetcherManager-1365179527478] > > > shutting d > > > own (kafka.consumer.ConsumerFetcherManager) > > > [2013-04-05 10:32:08,154] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba-leader-finder-thread], Shutting down > > > (kafka.consumer.ConsumerFetcherM > > > anager$$anon$1) > > > [2013-04-05 10:32:08,154] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba-leader-finder-thread], Stopped > > > (kafka.consumer.ConsumerFetcherManage > > > r$$anon$1) > > > [2013-04-05 10:32:08,154] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba-leader-finder-thread], Shutdown completed > > > (kafka.consumer.ConsumerFet > > > cherManager$$anon$1) > > > [2013-04-05 10:32:08,158] INFO [ConsumerFetcherManager-1365179527478] > > > shutdown c > > > ompleted (kafka.consumer.ConsumerFetcherManager) > > > Consumed 0 messages > > > [2013-04-05 10:32:08,294] INFO Terminate ZkClient event thread. > > > (org.I0Itec.zkcl > > > ient.ZkEventThread) > > > [2013-04-05 10:32:08,319] INFO Session: 0x13ddafd0fc40001 closed > > > (org.apache.zoo > > > keeper.ZooKeeper) > > > [2013-04-05 10:32:08,320] INFO EventThread shut down > > > (org.apache.zookeeper.Clien > > > tCnxn) > > > [2013-04-05 10:32:08,320] INFO > > > [console-consumer-12815_MERD7-178041-136517952738 > > > 3-1da2aeba], ZKConsumerConnector shut down completed > > > (kafka.consumer.ZookeeperCo > > > nsumerConnector) > > > [2013-04-05 10:32:08,321] INFO Initiating client connection, > > > connectString=local > > > host:2181 sessionTimeout=30000 > > watcher=org.I0Itec.zkclient.ZkClient@3639d41(org > > > .apache.zookeeper.ZooKeeper) > > > [2013-04-05 10:32:08,321] INFO Starting ZkClient event thread. > > > (org.I0Itec.zkcli > > > ent.ZkEventThread) > > > [2013-04-05 10:32:08,324] INFO Opening socket connection to server > > > localhost/127 > > > .0.0.1:2181 (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:32:08,325] INFO Socket connection established to > > > localhost/127.0. > > > 0.1:2181, initiating session (org.apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:32:08,351] INFO Session establishment complete on server > > > localhos > > > t/127.0.0.1:2181, sessionid = 0x13ddafd0fc40002, negotiated timeout = > > > 30000 (org > > > .apache.zookeeper.ClientCnxn) > > > [2013-04-05 10:32:08,352] INFO zookeeper state changed (SyncConnected) > > > (org.I0It > > > ec.zkclient.ZkClient) > > > [2013-04-05 10:32:08,543] INFO Terminate ZkClient event thread. > > > (org.I0Itec.zkcl > > > ient.ZkEventThread) > > > [2013-04-05 10:32:08,568] INFO Session: 0x13ddafd0fc40002 closed > > > (org.apache.zoo > > > keeper.ZooKeeper) > > > [2013-04-05 10:32:08,568] INFO EventThread shut down > > > (org.apache.zookeeper.Clien > > > tCnxn) > > > > > > > > > > > > Thanks, > > > Rob > > > > > > > > > -----Original Message----- > > > From: Jun Rao [mailto:jun...@gmail.com] > > > Sent: Friday, April 05, 2013 10:02 AM > > > To: users@kafka.apache.org > > > Subject: Re: LeaderNotAvailableException: reventing the running of > > > kafka-console-producer.bat > > > > > > If this happens on every message, it indicates a problem. Could you > wipe > > > out all ZK and Kafka data and try it again? If it still doesn't work, > > could > > > you try the latest revision in the 0.8 branch? > > > > > > Thanks, > > > > > > Jun > > > > > > > > > On Fri, Apr 5, 2013 at 8:50 AM, Withers, Robert < > robert.with...@dish.com > > > >wrote: > > > > > > > Yes, it happens on every message. I ran the zookeeper, server, > > > > console-producer against --broker-list localhost:9092 --topic test, > > > > then shut everything down and restarted the zookeeper and server and > > > > ran the console-consumer --zookeeper localhost:2181 --topic test and > > > > both the server console and consumer console reported WARNs of > > > > LeaderNotAvailableException. > > > > > > > > Since they were WARNs, would that mean that a message got produced > and > > > > then consumed? > > > > > > > > Thanks, > > > > Rob > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: Jun Rao [mailto:jun...@gmail.com] > > > > Sent: Thursday, April 04, 2013 10:03 PM > > > > To: users@kafka.apache.org > > > > Subject: Re: LeaderNotAvailableException: reventing the running of > > > > kafka-console-producer.bat > > > > > > > > This can happen on the first message in a new topic. Do you see the > > > > exception on posting every message? Also, run kafka-console-consumer > > > > to see if you can see the message. > > > > > > > > Thanks, > > > > > > > > Jun > > > > > > > > > > > > On Thu, Apr 4, 2013 at 1:37 PM, Withers, Robert > > > > <robert.with...@dish.com > > > > >wrote: > > > > > > > > > I am brand new to exploration into kafka, for work. Any help is > > > > > much appreciated. > > > > > > > > > > A co-worker built and updated a package for us to use on windows. > I > > > > > have no idea what version it is. We cannot update through our > > > > > firewall. :( > > > > I > > > > > am able to start the zookeeper and a kafka server, but when I run > > > > > the kafka-console-producer.bat file and enter a "hello world" input > > > > > to post to the broker, the broker throws the > > > LeaderNotAvailableException. > > > > > > > > > > Thanks for any assistance. > > > > > Rob > > > > > > > > > > > > > > > > > > > >