主持人无法在Console Producer中使用Kafka [英] Leader Not Available Kafka in Console Producer
问题描述
我正在尝试使用Kafka.
所有配置都正确完成,但是当我尝试从控制台生成消息时,我不断收到以下错误
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版本:2.11-0.9.0.0
推荐答案
它可能与server.properties
中的advertised.host.name
设置有关.
It could be related to advertised.host.name
setting in your server.properties
.
可能发生的情况是,您的生产者试图找出谁是给定分区的领导者,找出其advertised.host.name
和advertised.port
并尝试进行连接.
如果这些设置配置不正确,则可能会认为该领导者不可用.
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.
这篇关于主持人无法在Console Producer中使用Kafka的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!