This post explains How To Fix - Leader Not Available in Kafka Console Producer
LEADER\_NOT\_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
advertised.host.name
advertised.port
port = 9092
advertised.host.name = localhost or 127.0.0.1
advertised.listeners=PLAINTEXT://YOUR\_IP:9092
listeners = PLAINTEXT://0.0.0.0:9092
advertised.listeners=PLAINTEXT://Kafka\_IP:9092
listeners = PLAINTEXT://0.0.0.0:9092
Hope this helps - to Fix - Leader Not Available in Kafka Console Producer. Additional Read -