How to resolve Kafka error: Connection to node 0 could not be established?

Viewed 2124

I'm trying to run Kafka. I'm able to start up zookeeper but when I start the Kafka server using

.\bin\windows\kafka-server-start.bat .\config\server.properties

I get the following error:

WARN [Controller id=0, targetBrokerId=0] Connection to node 0 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

Might anyone know how to resolve this issue? Thanks in advance.

1 Answers

I had this error yesterday and just resolved it this morning. For others who run into a similar issue, my fix was in server.properties to change

listeners=PLAINTEXT://:9092 to listeners=PLAINTEXT://127.0.0.1:9092

Related