kafka使用者找不到集合的引线,获取主题的相关id为4的主题元数据失败

edqdpe6u  于 2021-06-07  发布在  Kafka
关注(0)|答案(1)|浏览(361)

因此,我在一个kafka0.8.2.0代理和一个运行在mesos中的java消费者中遇到了这个错误。我不得不说它以前是有用的,但现在什么都没变。
以下是消费者在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--descripe),效果很好: 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

pkbketx9

pkbketx91#

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

相关问题