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

1

5

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.

Ophidian answered 23/6, 2020 at 13:17 Comment(0)
O
21

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

Ophidian answered 23/6, 2020 at 13:29 Comment(1)
we can also specify listeners=PLAINTEXT://localhost:9092 instead of listeners=PLAINTEXT://127.0.0.1:9092Zoosporangium

© 2022 - 2024 — McMap. All rights reserved.