Leader Not Available Kafka in Console Producer

前端 未结 24 2625
野趣味
野趣味 2020-12-07 07:47

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 Err         


        
24条回答
  •  旧时难觅i
    2020-12-07 08:30

    If you get repeated error messages like this:

    Error while fetching metadata with correlation id 3991 : {your.topic=LEADER_NOT_AVAILABLE}
    

    Or

    Discovered group coordinator 172.25.1.2:9092 (id: 2147483645 rack: null) (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:677)
    (Re-)joining group (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:509)
    Group coordinator 172.25.1.2:9092 (id: 2147483645 rack: null) is unavailable or invalid, will attempt rediscovery (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:729)
    Discovered group coordinator 172.25.40.219:9092 (id: 2147483645 rack: null) (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:677)
    Group coordinator 172.25.1.2:9092 (id: 2147483645 rack: null) is unavailable or invalid, will attempt rediscovery (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:729)
    

    Then, you need to configure listener settings like this in the kafka server.properties:

     listeners=PLAINTEXT://your.server.ip:9092
    

    This is the solution tried on Apacke Kafka 2.5.0 and confluent platform 5.4.1.

提交回复
热议问题