首页 > 代码库 > kafka.common.KafkaException: fetching topic metadata for topics
kafka.common.KafkaException: fetching topic metadata for topics
2016-10-26 11:05:29,716 WARN [flume_dx2.zdp.ol-1477451127056-e2015d55-leader-finder-thread] kafka.consumer.ConsumerFetcherManager$LeaderFinderThread (line 89) [flume_dx2.zdp.ol-1477451127056-e2015d55-leader-finder-thread], Failed to find leader for Set([v4-avail-service-request,0]) kafka.common.KafkaException: fetching topic metadata for topics [Set(v4-avail-service-request)] from broker [ArrayBuffer(BrokerEndPoint(0,ip-192-168-110-4.cn-north-1.compute.internal,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:63) Caused by: java.nio.channels.ClosedChannelException at kafka.network.BlockingChannel.send(BlockingChannel.scala:110) at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:76) at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:75) at kafka.producer.SyncProducer.send(SyncProducer.scala:120) at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:58) ... 3 more
Flume从Kafka订阅数据报错Failed to find leader for Set
Flume部署在本地,Kafka集群部署在AWS云上。
解决办法
Consume端服务器配置/etc/hosts文件,其中机器名从要同Kafka服务端私有DNS名称相同(这个名称可以在报错信息中看到)
123.123.123.123 ip-192-168-110-4.cn-north-1.compute.internal
本文出自 “巧克力黑” 博客,请务必保留此出处http://10120275.blog.51cto.com/10110275/1865792
kafka.common.KafkaException: fetching topic metadata for topics
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。