可能发生的情况是,您的生产者试图找出给定分区的领导者,找出其 advertised.host.name 和 advertised.port并尝试连接.如果这些设置没有正确配置,那么它可能会认为领导者不可用.I am trying to use Kafka.All configurations are done properly but when I try to produce message from console I keep getting the following errorWARN Error while fetching metadata with correlation id 39 : {4-3-16-topic1=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)Kafka version: 2.11-0.9.0.0 解决方案 It could be related to advertised.host.name setting in your server.properties.What could happen is that your producer is trying to find out who is the leader for a given partition, figures out its advertised.host.name and advertised.port and tries to connect.If these settings are not configured correctly it then may think that the leader is unavailable. 这篇关于控制台生产者中的领导者不可用 Kafka的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-05 00:55