I just tried to go through the quickstart, step by step on a Mac. I got the same thing (LeaderNotAvailableException).
On Thu, Apr 25, 2013 at 9:30 PM, Jun Rao <jun...@gmail.com> wrote: > Thanks. Is anyone able to run the 0.8 quickstart without this issue on > Windows? > > Jun > > > On Thu, Apr 25, 2013 at 10:27 AM, Yin Yin <yin....@outlook.com> wrote: > > > How to make sure the code is the latest? I ran these commands. Created > the > > ticket KAFKA-876 for this issue. Thanks a lot > > > > PS C:\Projects\Kafka\kafka> git branch > > * 0.8 > > trunk > > PS C:\Projects\Kafka\kafka> git pull > > Already up-to-date. > > PS C:\Projects\Kafka\kafka> > > > > =========================Broker Log============================= > > > > Set JMX_PORT to default value : 9999 > > C:\Projects\Kafka\kafka\bin\.. > > log4j:ERROR Failed to rename [server.log] to [server.log.2013-04-25-09]. > > [2013-04-25 10:08:49,531] INFO Verifying properties > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property socket.send.buffer.bytes is > > overridden to 1048576 (kafka.utils.VerifiablePropert > > ies) > > [2013-04-25 10:08:49,578] INFO Property socket.request.max.bytes is > > overridden to 104857600 (kafka.utils.VerifiablePrope > > rties) > > [2013-04-25 10:08:49,578] INFO Property log.dir is overridden to > > /tmp/kafka-logs (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property log.cleanup.interval.mins is > > overridden to 1 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property log.retention.hours is overridden > > to > > 168 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property num.io.threads is overridden to 2 > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property broker.id is overridden to 0 > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] WARN Property > kafka.csv.metrics.reporter.enabled > > is not valid (kafka.utils.VerifiablePropertie > > s) > > [2013-04-25 10:08:49,578] INFO Property port is overridden to 9092 > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property log.flush.interval.messages is > > overridden to 10000 (kafka.utils.VerifiableProper > > ties) > > [2013-04-25 10:08:49,578] INFO Property zk.connection.timeout.ms is > > overridden to 1000000 (kafka.utils.VerifiablePropert > > ies) > > [2013-04-25 10:08:49,578] WARN Property kafka.metrics.reporters is not > > valid > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] WARN Property kafka.csv.metrics.dir is not > valid > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property log.flush.interval.ms is > > overridden > > to 1000 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] WARN Property > kafka.metrics.polling.interval.secs > > is not valid (kafka.utils.VerifiableProperti > > es) > > [2013-04-25 10:08:49,578] INFO Property num.network.threads is overridden > > to > > 2 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property socket.receive.buffer.bytes is > > overridden to 1048576 (kafka.utils.VerifiableProp > > erties) > > [2013-04-25 10:08:49,578] INFO Property log.segment.bytes is overridden > to > > 536870912 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,578] INFO Property zk.connect is overridden to > > localhost:2181 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,594] INFO Property num.partitions is overridden to 1 > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:49,609] INFO [Kafka Server 0], starting > > (kafka.server.KafkaServer) > > [2013-04-25 10:08:49,625] INFO [Log Manager on Broker 0] Log directory > > 'C:\tmp\kafka-logs' not found, creating it. (kafk > > a.log.LogManager) > > [2013-04-25 10:08:49,625] INFO [Log Manager on Broker 0] Starting log > > cleaner every 60000 ms (kafka.log.LogManager) > > [2013-04-25 10:08:49,640] INFO [Log Manager on Broker 0] Starting log > > flusher every 3000 ms with the following overrides > > Map() (kafka.log.LogManager) > > [2013-04-25 10:08:49,656] INFO Awaiting socket connections on > 0.0.0.0:9092 > > . > > (kafka.network.Acceptor) > > [2013-04-25 10:08:49,656] INFO [Socket Server on Broker 0], started > > (kafka.network.SocketServer) > > [2013-04-25 10:08:49,672] INFO connecting to ZK: localhost:2181 > > (kafka.server.KafkaZooKeeper) > > [2013-04-25 10:08:49,672] INFO Starting ZkClient event thread. > > (org.I0Itec.zkclient.ZkEventThread) > > [2013-04-25 10:08:49,672] INFO Client > > environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 > GMT > > (org.ap > > ache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,672] INFO Client > > environment:host.name=YIYIN-MAIN.redmond.corp.microsoft.com > > (org.apache.zookeeper. > > ZooKeeper) > > [2013-04-25 10:08:49,672] INFO Client environment:java.version=1.7.0_21 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,672] INFO Client environment:java.vendor=Oracle > > Corporation (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,672] INFO Client environment:java.home=C:\Program > > Files > > (x86)\Java\jdk1.7.0_21\jre (org.apache.zook > > eeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client > > environment:java.io.tmpdir=C:\Users\yiyin\AppData\Local\Temp\ > > (org.apache.zookeepe > > r.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client environment:java.compiler=<NA> > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client environment:os.name=Windows 8 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client environment:os.arch=x86 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client environment:os.version=6.2 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client environment:user.name=yiyin > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client > environment:user.home=C:\Users\yiyin > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Client > > environment:user.dir=C:\Projects\Kafka\kafka\bin > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,687] INFO Initiating client connection, > > connectString=localhost:2181 sessionTimeout=6000 watcher=or > > g.I0Itec.zkclient.ZkClient@16e73e3 (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:49,703] INFO Opening socket connection to server > > localhost/127.0.0.1:2181 (org.apache.zookeeper.Client > > Cnxn) > > [2013-04-25 10:08:49,703] INFO Socket connection established to > > localhost/127.0.0.1:2181, initiating session (org.apache > > .zookeeper.ClientCnxn) > > [2013-04-25 10:08:49,781] INFO Session establishment complete on server > > localhost/127.0.0.1:2181, sessionid = 0x13e422b2 > > f620000, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn) > > [2013-04-25 10:08:49,781] INFO zookeeper state changed (SyncConnected) > > (org.I0Itec.zkclient.ZkClient) > > [2013-04-25 10:08:49,812] INFO Registered broker 0 at path /brokers/ids/0 > > with address YIYIN-MAIN.redmond.corp.microsoft > > .com:9092. (kafka.utils.ZkUtils$) > > [2013-04-25 10:08:49,812] INFO [Kafka Server 0], Connecting to ZK: > > localhost:2181 (kafka.server.KafkaServer) > > [2013-04-25 10:08:49,859] INFO Will not load MX4J, mx4j-tools.jar is not > in > > the classpath (kafka.utils.Mx4jLoader$) > > [2013-04-25 10:08:49,875] INFO 0 successfully elected as leader > > (kafka.server.ZookeeperLeaderElector) > > [2013-04-25 10:08:49,984] INFO No state transitions triggered since no > > partitions are assigned to brokers 0 (kafka.utils > > .ZkUtils$) > > [2013-04-25 10:08:49,984] INFO New leader is 0 > > (kafka.server.ZookeeperLeaderElector$LeaderChangeListener) > > [2013-04-25 10:08:50,000] INFO [Kafka Server 0], started > > (kafka.server.KafkaServer) > > [2013-04-25 10:08:55,969] INFO Closing socket connection to / > 10.123.11.25. > > (kafka.network.Processor) > > [2013-04-25 10:09:03,234] INFO [KafkaApi-0] Auto creation of topic test > > with > > 1 partitions and replication factor 1 is su > > ccessful! (kafka.server.KafkaApis) > > [2013-04-25 10:09:03,281] INFO Closing socket connection to /127.0.0.1. > > (kafka.network.Processor) > > [2013-04-25 10:09:03,281] INFO [Replica Manager on Broker 0]: Handling > > LeaderAndIsr request Name:LeaderAndIsrRequest;Ver > > > > > sion:0;Controller:0;ControllerEpoch:1;CorrelationId:5;ClientId:id_0-host_nul > > l-port_9092;AckTimeoutMs:1000 ms;PartitionSt > > ate:(test,0) -> > > > > > (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:0,ControllerEpoch:1),Replicati > > onFactor:1);Leaders:id:0,hos > > t:YIYIN-MAIN.redmond.corp.microsoft.com,port:9092 > > (kafka.server.ReplicaManager) > > [2013-04-25 10:09:03,281] INFO [ReplicaFetcherManager on broker 0] > Removing > > fetcher for partition [test,0] (kafka.server > > .ReplicaFetcherManager) > > [2013-04-25 10:09:03,297] INFO [Kafka Log on Broker 0], Completed load of > > log test-0 with log end offset 0 (kafka.log.Lo > > g) > > [2013-04-25 10:09:03,297] INFO [Log Manager on Broker 0] Created log for > > topic test partition 0 in C:\tmp\kafka-logs. (k > > afka.log.LogManager) > > [2013-04-25 10:09:03,297] INFO [Replica Manager on Broker 0]: Handled > > leader > > and isr request Name:LeaderAndIsrRequest;Ve > > > > > rsion:0;Controller:0;ControllerEpoch:1;CorrelationId:5;ClientId:id_0-host_nu > > ll-port_9092;AckTimeoutMs:1000 ms;PartitionS > > tate:(test,0) -> > > > > > (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:0,ControllerEpoch:1),Replicati > > onFactor:1);Leaders:id:0,ho > > st:YIYIN-MAIN.redmond.corp.microsoft.com,port:9092 > > (kafka.server.ReplicaManager) > > [2013-04-25 10:09:03,438] INFO Closing socket connection to /127.0.0.1. > > (kafka.network.Processor) > > [2013-04-25 10:09:03,453] WARN [KafkaApi-0] Produce request: Leader not > > local for partition [test,0] on broker 0 (kafka. > > server.KafkaApis) > > [2013-04-25 10:09:05,453] WARN [KafkaApi-0] Produce request: Leader not > > local for partition [test,0] on broker 0 (kafka. > > server.KafkaApis) > > [2013-04-25 10:09:07,250] WARN [KafkaApi-0] Produce request: Leader not > > local for partition [test,0] on broker 0 (kafka. > > server.KafkaApis) > > [2013-04-25 10:09:08,891] WARN [KafkaApi-0] Produce request: Leader not > > local for partition [test,0] on broker 0 (kafka. > > server.KafkaApis) > > > > > > > > =============================Producer Log============================== > > > > C:\Projects\Kafka\kafka\bin\.. > > [2013-04-25 10:08:52,531] INFO Verifying properties > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property queue.buffering.max.messages is > > overridden to 10000 (kafka.utils.VerifiablePrope > > rties) > > [2013-04-25 10:08:52,547] INFO Property key.serializer.class is > overridden > > to kafka.serializer.StringEncoder (kafka.util > > s.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property compression.codec is overridden > to > > 0 > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property serializer.class is overridden to > > kafka.serializer.StringEncoder (kafka.utils.Ve > > rifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property request.timeout.ms is overridden > > to > > 1500 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property broker.list is overridden to > > localhost:9092 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property send.buffer.bytes is overridden > to > > 102400 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property request.required.acks is > overridden > > to 0 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property producer.type is overridden to > sync > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property queue.buffering.max.ms is > > overridden > > to 1000 (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:52,547] INFO Property queue.enqueue.timeout.ms is > > overridden to 0 (kafka.utils.VerifiableProperties) > > hello > > [2013-04-25 10:09:03,203] INFO Fetching metadata with correlation id 0 > for > > 1 > > topic(s) Set(test) (kafka.client.ClientUtil > > s$) > > [2013-04-25 10:09:03,203] INFO Connected to localhost:9092 for producing > > (kafka.producer.SyncProducer) > > [2013-04-25 10:09:03,281] INFO Disconnecting from localhost:9092 > > (kafka.producer.SyncProducer) > > [2013-04-25 10:09:03,281] WARN Error while fetching metadata > partition 0 > > leader: none replicas: isr: > > isUnderReplicated: false for topic partition [test,0]: [class > > kafka.common.LeaderNotAvailableException] (kafka.producer. > > BrokerPartitionInfo) > > [2013-04-25 10:09:03,297] WARN Failed to collate messages by > > topic,partition > > due to (kafka.producer.async.DefaultEventHa > > ndler) > > kafka.common.LeaderNotAvailableException: No leader for any partition > > at > > > > > kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHa > > ndler$$getPartition(DefaultEventH > > andler.scala:212) > > at > > > > > kafka.producer.async.DefaultEventHandler$$anonfun$partitionAndCollate$1.appl > > y(DefaultEventHandler.scala:150) > > at > > > > > kafka.producer.async.DefaultEventHandler$$anonfun$partitionAndCollate$1.appl > > y(DefaultEventHandler.scala:148) > > at > > > > > scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:5 > > 7) > > at > > scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43) > > at > > > > > kafka.producer.async.DefaultEventHandler.partitionAndCollate(DefaultEventHan > > dler.scala:148) > > at > > > > > kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEvent > > Handler.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-04-25 10:09:03,406] INFO Fetching metadata with correlation id 2 > for > > 1 > > topic(s) Set(test) (kafka.client.ClientUtil > > s$) > > [2013-04-25 10:09:03,406] INFO Connected to localhost:9092 for producing > > (kafka.producer.SyncProducer) > > [2013-04-25 10:09:03,438] INFO Disconnecting from localhost:9092 > > (kafka.producer.SyncProducer) > > [2013-04-25 10:09:03,453] INFO Connected to > > YIYIN-MAIN.redmond.corp.microsoft.com:9092 for producing > > (kafka.producer.Syn > > cProducer) > > hello > > hello > > hello > > > > > > =================================ZooKeeper > > Log==================================== > > > > C:\Projects\Kafka\kafka\bin\.. > > [2013-04-25 10:08:46,500] INFO Reading configuration from: > > ..\config\zookeeper.properties (org.apache.zookeeper.server.q > > uorum.QuorumPeerConfig) > > [2013-04-25 10:08:46,500] WARN Either no config or no quorum defined in > > config, running in standalone mode (org.apache. > > zookeeper.server.quorum.QuorumPeerMain) > > [2013-04-25 10:08:46,515] INFO Reading configuration from: > > ..\config\zookeeper.properties (org.apache.zookeeper.server.q > > uorum.QuorumPeerConfig) > > [2013-04-25 10:08:46,515] INFO Starting server > > (org.apache.zookeeper.server.ZooKeeperServerMain) > > [2013-04-25 10:08:46,531] INFO Server > > environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 > GMT > > (org.ap > > ache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server > > environment:host.name=YIYIN-MAIN.redmond.corp.microsoft.com > > (org.apache.zookeeper. > > server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:java.version=1.7.0_21 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:java.vendor=Oracle > > Corporation (org.apache.zookeeper.server.ZooKeeperS > > erver) > > [2013-04-25 10:08:46,531] INFO Server environment:java.home=C:\Program > > Files > > (x86)\Java\jdk1.7.0_21\jre (org.apache.zook > > eeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server > > environment:java.io.tmpdir=C:\Users\yiyin\AppData\Local\Temp\ > > (org.apache.zookeepe > > r.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:java.compiler=<NA> > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:os.name=Windows 8 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:os.arch=x86 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:os.version=6.2 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server environment:user.name=yiyin > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO Server > environment:user.home=C:\Users\yiyin > > (org.apache.zookeeper.server.ZooKeeperServer) > > > > [2013-04-25 10:08:46,531] INFO Server > > environment:user.dir=C:\Projects\Kafka\kafka\bin > > (org.apache.zookeeper.server.ZooK > > eeperServer) > > [2013-04-25 10:08:46,531] INFO tickTime set to 3000 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO minSessionTimeout set to -1 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,531] INFO maxSessionTimeout set to -1 > > (org.apache.zookeeper.server.ZooKeeperServer) > > [2013-04-25 10:08:46,547] INFO binding to port 0.0.0.0/0.0.0.0:2181 > > (org.apache.zookeeper.server.NIOServerCnxn) > > [2013-04-25 10:08:46,562] INFO Snapshotting: 0 > > (org.apache.zookeeper.server.persistence.FileTxnSnapLog) > > [2013-04-25 10:08:49,703] INFO Accepted socket connection from > > /127.0.0.1:8001 (org.apache.zookeeper.server.NIOServerCnx > > n) > > [2013-04-25 10:08:49,703] INFO Client attempting to establish new session > > at > > /127.0.0.1:8001 (org.apache.zookeeper.serve > > r.NIOServerCnxn) > > [2013-04-25 10:08:49,703] INFO Creating new log file: log.1 > > (org.apache.zookeeper.server.persistence.FileTxnLog) > > [2013-04-25 10:08:49,781] INFO Established session 0x13e422b2f620000 with > > negotiated timeout 6000 for client /127.0.0.1: > > 8001 (org.apache.zookeeper.server.NIOServerCnxn) > > [2013-04-25 10:08:49,812] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:create cx > > id:0x1 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/brokers/ids Error:KeeperErrorCode = NoNode for /b > > rokers/ids (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:08:49,812] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:create cx > > id:0x2 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/brokers Error:KeeperErrorCode = NoNode for /broke > > rs (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:08:49,875] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:setData c > > xid:0xb zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/controller_epoch Error:KeeperErrorCode = NoNode > > for /controller_epoch (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:08:49,984] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:delete cx > > id:0x19 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/admin Error:KeeperErrorCode = NoNode for /admin > > (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:08:55,594] INFO Accepted socket connection from > > /127.0.0.1:8007 (org.apache.zookeeper.server.NIOServerCnx > > n) > > [2013-04-25 10:08:55,609] INFO Client attempting to establish new session > > at > > /127.0.0.1:8007 (org.apache.zookeeper.serve > > r.NIOServerCnxn) > > [2013-04-25 10:08:55,672] INFO Established session 0x13e422b2f620001 with > > negotiated timeout 6000 for client /127.0.0.1: > > 8007 (org.apache.zookeeper.server.NIOServerCnxn) > > [2013-04-25 10:08:55,687] INFO Accepted socket connection from > > /127.0.0.1:8010 (org.apache.zookeeper.server.NIOServerCnx > > n) > > [2013-04-25 10:08:55,687] INFO Client attempting to establish new session > > at > > /127.0.0.1:8010 (org.apache.zookeeper.serve > > r.NIOServerCnxn) > > [2013-04-25 10:08:55,687] INFO Established session 0x13e422b2f620002 with > > negotiated timeout 30000 for client /127.0.0.1 > > :8010 (org.apache.zookeeper.server.NIOServerCnxn) > > [2013-04-25 10:08:55,703] INFO Processed session termination for > sessionid: > > 0x13e422b2f620002 (org.apache.zookeeper.serv > > er.PrepRequestProcessor) > > [2013-04-25 10:08:55,703] INFO Closed socket connection for client > > /127.0.0.1:8010 which had sessionid 0x13e422b2f620002 > > (org.apache.zookeeper.server.NIOServerCnxn) > > [2013-04-25 10:08:55,750] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620001 type:create cx > > id:0x2 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/consumers/console-consumer-70983/ids Error:Keeper > > ErrorCode = NoNode for /consumers/console-consumer-70983/ids > > (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:08:55,750] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620001 type:create cx > > id:0x3 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/consumers/console-consumer-70983 Error:KeeperErro > > rCode = NoNode for /consumers/console-consumer-70983 > > (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:08:55,750] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620001 type:create cx > > id:0x4 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/consumers Error:KeeperErrorCode = NoNode for /con > > sumers (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:09:03,219] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:create cx > > id:0x21 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error > > Path:/brokers/topics Error:KeeperErrorCode = NoNode fo > > r /brokers/topics (org.apache.zookeeper.server.PrepRequestProcessor) > > [2013-04-25 10:09:03,266] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:create cx > > id:0x2f 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.server.PrepRequestProcessor) > > [2013-04-25 10:09:03,266] INFO Got user-level KeeperException when > > processing sessionid:0x13e422b2f620000 type:create cx > > id:0x30 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.PrepRequestProcessor) > > > > > > ==============================Consumer > > Log======================================= > > > > C:\Projects\Kafka\kafka\bin\.. > > [2013-04-25 10:08:55,516] INFO Verifying properties > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:55,547] INFO Property zk.connect is overridden to > > localhost:2181 (kafka.utils.VerifiablePro > > [2013-04-25 10:08:55,547] INFO Property group.id is overridden to > > console-consumer-70983 (kafka.utils.Verifia > > es) > > [2013-04-25 10:08:55,547] INFO Property fetch.message.max.bytes is > > overridden to 1048576 (kafka.utils.Verifia > > es) > > [2013-04-25 10:08:55,547] INFO Property consumer.timeout.ms is > overridden > > to > > -1 (kafka.utils.VerifiableProper > > [2013-04-25 10:08:55,547] INFO Property socket.timeout.ms is overridden > to > > 30000 (kafka.utils.VerifiablePrope > > [2013-04-25 10:08:55,547] INFO Property auto.offset.reset is overridden > to > > smallest (kafka.utils.VerifiablePr > > [2013-04-25 10:08:55,547] INFO Property socket.receive.buffer.bytes is > > overridden to 2097152 (kafka.utils.Ver > > erties) > > [2013-04-25 10:08:55,547] INFO Property fetch.wait.max.ms is overridden > to > > 100 (kafka.utils.VerifiablePropert > > [2013-04-25 10:08:55,547] INFO Property auto.commit.enable is overridden > to > > true (kafka.utils.VerifiablePrope > > [2013-04-25 10:08:55,547] INFO Property auto.commit.interval.ms is > > overridden to 10000 (kafka.utils.Verifiabl > > ) > > [2013-04-25 10:08:55,547] INFO Property fetch.min.bytes is overridden to > 1 > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:55,562] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Connecting to > > zook > > nce at localhost:2181 (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,562] INFO Starting ZkClient event thread. > > (org.I0Itec.zkclient.ZkEventThread) > > [2013-04-25 10:08:55,578] INFO Client > > environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 > > ache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client > > environment:host.name=YIYIN-MAIN.redmond.corp.microsoft.com (org.apache > > ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:java.version=1.7.0_21 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:java.vendor=Oracle > > Corporation (org.apache.zookeeper.ZooKee > > [2013-04-25 10:08:55,578] INFO Client environment:java.home=C:\Program > > Files > > (x86)\Java\jdk1.7.0_21\jre (org. > > eeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client > > environment:java.io.tmpdir=C:\Users\yiyin\AppData\Local\Temp\ (org.apac > > r.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:java.compiler=<NA> > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:os.name=Windows 8 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:os.arch=x86 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:os.version=6.2 > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client environment:user.name=yiyin > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client > environment:user.home=C:\Users\yiyin > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,578] INFO Client > > environment:user.dir=C:\Projects\Kafka\kafka\bin (org.apache.zookeeper. > > [2013-04-25 10:08:55,578] INFO Initiating client connection, > > connectString=localhost:2181 sessionTimeout=6000 > > g.I0Itec.zkclient.ZkClient@1124f52 (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,594] INFO Opening socket connection to server > > localhost/127.0.0.1:2181 (org.apache.zooke > > Cnxn) > > [2013-04-25 10:08:55,594] INFO Socket connection established to > > localhost/127.0.0.1:2181, initiating session > > .zookeeper.ClientCnxn) > > [2013-04-25 10:08:55,672] INFO Session establishment complete on server > > localhost/127.0.0.1:2181, sessionid = > > f620001, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn) > > [2013-04-25 10:08:55,672] INFO zookeeper state changed (SyncConnected) > > (org.I0Itec.zkclient.ZkClient) > > [2013-04-25 10:08:55,672] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], starting auto > > comm > > 10000 ms (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,687] INFO Initiating client connection, > > connectString=localhost:2181 sessionTimeout=3000 > > rg.I0Itec.zkclient.ZkClient@13033a (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,687] INFO Starting ZkClient event thread. > > (org.I0Itec.zkclient.ZkEventThread) > > [2013-04-25 10:08:55,687] INFO Opening socket connection to server > > localhost/127.0.0.1:2181 (org.apache.zooke > > Cnxn) > > [2013-04-25 10:08:55,687] INFO Socket connection established to > > localhost/127.0.0.1:2181, initiating session > > .zookeeper.ClientCnxn) > > [2013-04-25 10:08:55,687] INFO Session establishment complete on server > > localhost/127.0.0.1:2181, sessionid = > > f620002, negotiated timeout = 30000 (org.apache.zookeeper.ClientCnxn) > > [2013-04-25 10:08:55,687] INFO zookeeper state changed (SyncConnected) > > (org.I0Itec.zkclient.ZkClient) > > [2013-04-25 10:08:55,703] INFO Terminate ZkClient event thread. > > (org.I0Itec.zkclient.ZkEventThread) > > [2013-04-25 10:08:55,703] INFO Session: 0x13e422b2f620002 closed > > (org.apache.zookeeper.ZooKeeper) > > [2013-04-25 10:08:55,703] INFO EventThread shut down > > (org.apache.zookeeper.ClientCnxn) > > [2013-04-25 10:08:55,734] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], begin > > registering > > nsole-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c in ZK > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,750] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], end > registering > > co > > ole-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c in ZK > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,750] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], starting > > watcher > > e > > ead for consumer console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c > > (kafka.consumer.ZookeeperConsumerCo > > [2013-04-25 10:08:55,766] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], begin > > rebalancing > > nsole-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c try #0 > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,891] INFO Verifying properties > > (kafka.utils.VerifiableProperties) > > [2013-04-25 10:08:55,906] INFO Property broker.list is overridden to > > YIYIN-MAIN.redmond.corp.microsoft.com:90 > > tils.VerifiableProperties) > > [2013-04-25 10:08:55,906] INFO Property request.timeout.ms is overridden > > to > > 30000 (kafka.utils.VerifiableProp > > [2013-04-25 10:08:55,906] INFO Property client.id is overridden to > > console-consumer-70983 (kafka.utils.Verifi > > ies) > > [2013-04-25 10:08:55,922] INFO Fetching metadata with correlation id 0 > for > > 0 > > topic(s) Set() (kafka.client.Cli > > [2013-04-25 10:08:55,922] INFO Connected to > > YIYIN-MAIN.redmond.corp.microsoft.com:9092 for producing (kafka.p > > cProducer) > > [2013-04-25 10:08:55,969] INFO Disconnecting from > > YIYIN-MAIN.redmond.corp.microsoft.com:9092 (kafka.producer. > > r) > > [2013-04-25 10:08:55,969] INFO [ConsumerFetcherManager-1366909735672] > > Stopping leader finder thread (kafka.co > > umerFetcherManager) > > [2013-04-25 10:08:55,969] INFO [ConsumerFetcherManager-1366909735672] > > Stopping all fetchers (kafka.consumer.C > > herManager) > > [2013-04-25 10:08:55,969] INFO [ConsumerFetcherManager-1366909735672] All > > connections stopped (kafka.consumer > > tcherManager) > > [2013-04-25 10:08:55,969] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Cleared all > > releva > > or this fetcher (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,969] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Cleared the > > data > > c > > l the consumer message iterators > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,969] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Committing > all > > off > > clearing the fetcher queues (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,969] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Releasing > > partitio > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,984] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Updating the > > cache > > sumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,984] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Consumer > > console-c > > 83_YIYIN-MAIN-1366909735562-a3d9410c selected partitions : > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,984] INFO > > > > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c-leader-finder-thre > > ad > > (kafka.consumer.ConsumerFetcherManager$LeaderFinderThread) > > [2013-04-25 10:08:55,984] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], end > rebalancing > > co > > ole-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c try #0 > > (kafka.consumer.ZookeeperConsumerConnector) > > [2013-04-25 10:08:55,984] INFO > > [console-consumer-70983_YIYIN-MAIN-1366909735562-a3d9410c], Not creating > > event > > r trivial whitelist test (kafka.consumer.ZookeeperConsumerConnector) > > > > > > > > -----Original Message----- > > From: Jun Rao [mailto:jun...@gmail.com] > > Sent: Thursday, April 25, 2013 7:21 AM > > To: users@kafka.apache.org > > Subject: Re: LeaderNotAvailable Exception > > > > Hmm, then it's weird. Could you try the latest code in 0.8? If the > problem > > persists, could you file a jira and attach the broker log? > > > > Thanks, > > > > Jun > > > > > > On Wed, Apr 24, 2013 at 11:00 PM, Yin Yin <yin....@outlook.com> wrote: > > > > > With the option --unavailable-partitions --topic topic1, > > > kafka-list-topic doesn't show anything related to topic1> Date: Wed, > > > 24 Apr 2013 20:58:09 > > > -0700 > > > > Subject: Re: LeaderNotAvailable Exception > > > > From: jun...@gmail.com > > > > To: users@kafka.apache.org > > > > > > > > What output do you get if you add the --unavailable-partitions > > > > option in list topic? > > > > > > > > Thanks, > > > > > > > > Jun > > > > > > > > > > > > On Wed, Apr 24, 2013 at 5:20 PM, Yin Yin <yin....@outlook.com> > wrote: > > > > > > > > > This exception happens only once. But there is another error for > > > > > each producer request > > > > > [2013-04-24 14:47:39,077] WARN [KafkaApi-0] Produce request: > > > > > Leader > > > not > > > > > local for partition [topic1,0] on broker 0 > > > > > (kafka.server.KafkaApis) > > > Here > > > > > is the information I get from kafka-list-topic, which indicates > > > > > that > > > > > borker0 is the leader for topic1 and partition 0 [2013-04-24 > > > 14:56:03,948] > > > > > INFO zookeeper state changed (SyncConnected) > > > (org.I0Itec.zkclient.ZkClient) > > > > > topic: topic1 partition: 0 leader: 0 replicas: 0 > isr: > > 0 > > > > > > > > > From: libo...@citi.com > > > > > > To: users@kafka.apache.org > > > > > > Subject: Re: LeaderNotAvailable Exception > > > > > > Date: Wed, 24 Apr 2013 17:38:23 +0000 > > > > > > > > > > > > Hi Jun, > > > > > > > > > > > > This exception also gave me a hard time. In my case, I didn't > > > > > > create > > > the > > > > > topic > > > > > > before using it for producing. > > > > > > > > > > > > Regards, > > > > > > > > > > > > Libo > > > > > > > > > > > > > > > > > > > > > > > > >