控制台生产者中的领导者不可用 Kafka [英] Leader Not Available Kafka in Console Producer
问题描述
我正在尝试使用 Kafka.
所有配置都正确完成,但是当我尝试从控制台生成消息时,我不断收到以下错误
WARN 获取相关 ID 为 39 的元数据时出错:{4-3-16-topic1=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
Kafka 版本:2.11-0.9.0.0
它可能与 server.properties
中的 advertised.host.name
设置有关.>
可能发生的情况是,您的生产者试图找出给定分区的领导者,找出其 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 error
WARN 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!