Lior Gonnen created KAFKA-2152: ---------------------------------- Summary: Console producer fails to start when server running with broker.id != 0 Key: KAFKA-2152 URL: https://issues.apache.org/jira/browse/KAFKA-2152 Project: Kafka Issue Type: Bug Components: core Affects Versions: 0.8.2.1 Reporter: Lior Gonnen Priority: Critical
Scenario to reproduce: 1. Start zookeeper as usual: bin/zookeeper-server-start.sh config/zookeeper.properties 2. Start local server as usual: bin/kafka-server-start.sh config/server.properties 3. Start console producer: bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test 4. Producer starts as usual, and allows sending messages 5. Stop the producer and server 6. In config/server.properties, change broker.id to 2 (or any other non-zero number) 7. Repeat steps 2 and 3 8. The received output is as follows: [2015-04-26 20:00:47,571] 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) [2015-04-26 20:00:47,575] WARN Failed to collate messages by topic,partition due to: No leader for any partition in topic test (kafka.producer.async.DefaultEventHandler) [2015-04-26 20:00:47,682] 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) [2015-04-26 20:00:47,682] WARN Failed to collate messages by topic,partition due to: No leader for any partition in topic test (kafka.producer.async.DefaultEventHandler) [2015-04-26 20:00:47,789] 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) [2015-04-26 20:00:47,790] WARN Failed to collate messages by topic,partition due to: No leader for any partition in topic test (kafka.producer.async.DefaultEventHandler) [2015-04-26 20:00:47,897] 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) [2015-04-26 20:00:47,897] WARN Failed to collate messages by topic,partition due to: No leader for any partition in topic test (kafka.producer.async.DefaultEventHandler) [2015-04-26 20:00:48,002] 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) [2015-04-26 20:00:48,004] ERROR Failed to send requests for topics test with correlation ids in [0,8] (kafka.producer.async.DefaultEventHandler) [2015-04-26 20:00:48,004] ERROR Error in handling batch of 1 events (kafka.producer.async.ProducerSendThread) kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries. at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90) at kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:105) at kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:88) at kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:68) at scala.collection.immutable.Stream.foreach(Stream.scala:594) at kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:67) at kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:45) -- This message was sent by Atlassian JIRA (v6.3.4#6332)