Kafka使用者无法找到主题为Set and Fetching主题元数据,其主题元素为4,主题失败

时间:2016-03-17 06:27:02

标签: apache-kafka mesos

所以我在单个kafka 0.8.2.0代理和运行在mesos中的java消费者时遇到此错误。我不得不说它曾经工作过,而AFAIK没有任何改变。

消费者在mesos中运行时出现错误:

16/03/17 05:44:23 WARN ConsumerFetcherManager$LeaderFinderThread: [alertConsumer_secasprddb01-1-1458193432645-387abff0-leader-finder-thread], Failed to find leader for Set([events,1], [events,14], [events,2], [events,8], [events,7], [events,10], [events,3], [events,11], [events,5], [events,0], [events,12], [events,13], [events,6], [events,4], [events,9]) kafka.common.KafkaException: fetching topic metadata for topics [Set(events)] from broker [ArrayBuffer(id:0,host:prodMessage01-1.blah.com,port:9092)] failed at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:72)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:93)
at kafka.consumer.ConsumerFetcherManager$LeaderFinderThread.doWork(ConsumerFetcherManager.scala:66)
at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:60) Caused by: java.net.SocketTimeoutException

我甚至完全删除了主题并从头开始重新创建它仍然是同样的错误。

如果我在与代理相同的盒子上运行脚本kafka-console-consumer.sh,我仍然会收到错误:

Failed to find leader for Set([events,1], [events,14], [events,2], [events,8], [events,7], [events,10], [events,3], [events,11], [events,5], [events,0], [events,12], [events,13], [events,6], [events,9], [events,4]) (kafka.consumer.ConsumerFetcherManager$LeaderFinderThread) kafka.common.KafkaException: fetching topic metadata for topics [Set(events)] from broker [ArrayBuffer(id:0,host:prodMessage01-1.blah.com,port:9092)] failed
    at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:72)
    at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:93)
    at kafka.consumer.ConsumerFetcherManager$LeaderFinderThread.doWork(ConsumerFetcherManager.scala:66)
    at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:60) Caused by: java.net.SocketTimeoutException

所以即使每个人都是经纪人的本地人,它仍然是失败的。这怎么可能呢?

如果我确实删除并重新创建了该主题,我看不出如何能够解决这个问题。

如果我做一个主题描述(kafka-topics.sh - describe),它可以正常工作: Topic:events PartitionCount:15 ReplicationFactor:1 Configs: Topic: events Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 1 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 2 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 3 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 4 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 5 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 6 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 7 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 8 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 9 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 10 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 11 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 12 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 13 Leader: 0 Replicas: 0 Isr: 0 Topic: events Partition: 14 Leader: 0 Replicas: 0 Isr: 0

1 个答案:

答案 0 :(得分:0)

请参阅上述有关我如何解决问题的评论。但是对于生产环境来说这是不可取的。