Я установил стабильную версию kafka (0.8.1 с 2.9.2 Scala) в соответствии с их веб-сайтом, и я запускаю ее с анкетом 3 node zookeeper (3.4.6). Я попытался создать тестовую тему, но продолжаю видеть, что нет лидера, назначенного разделу раздела:
[kafka_2.9.2-0.8.1]$ ./bin/kafka-topics.sh --zookeeper <zookeeper_ensemble> --describe --topic test-1
Topic:test-1 PartitionCount:1 ReplicationFactor:3 Configs:
Topic: test-1 Partition: 0 **Leader: none** Replicas: 0,1,2 **Isr:**
Я попытался написать в теме в любом случае с помощью производителя консоли, но столкнулся с исключением LeaderNotAvailableException:
[kafka_2.9.2-0.8.1]$ ./kafka-console-producer.sh --broker-list <broker_list> --topic test-1
hello world
[2014-04-22 11:58:48,297] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,321] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,322] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test-1 (kafka.producer.async.DefaultEventHandler)
[2014-04-22 11:58:48,445] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,467] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,467] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test-1 (kafka.producer.async.DefaultEventHandler)
[2014-04-22 11:58:48,590] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,612] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,612] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test-1 (kafka.producer.async.DefaultEventHandler)
[2014-04-22 11:58:48,731] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,753] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,754] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test-1 (kafka.producer.async.DefaultEventHandler)
[2014-04-22 11:58:48,876] WARN Error while fetching metadata [{TopicMetadata for topic test-1 ->
No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException}] for topic [test-1]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo)
[2014-04-22 11:58:48,877] ERROR Failed to send requests for topics test-1 with correlation ids in [0,8] (kafka.producer.async.DefaultEventHandler)
[2014-04-22 11:58:48,878] 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:104)
at kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
at kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
at scala.collection.immutable.Stream.foreach(Stream.scala:547)
at kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
at kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
Я также должен сказать, что это работало первоначально в течение нескольких дней, а затем внезапно возникла любая проблема, возникшая в этой проблеме.