Reputation: 31
I am trying to setup kafka 3.1.0 with java 11 on my local machine. However, while listing existing topics, I am getting timeout exception.
Steps followed:
Started zookeeper server:
zookeeper-server-start.bat config\\zookeeper.properties
Started kafka server:
kafka-server-start.bat config\\server.properties
Command to list topics:
kafka-topics --bootstrap-server localhost:2181 --list
Error while executing topic command : Timed out waiting for a node assignment. Call: listTopics \[2022-02-19 20:11:37,239\] ERROR org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: listTopics (kafka.admin.TopicCommand$)
Upvotes: 3
Views: 11382
Reputation: 810
Are you using port 2181 for Kafka? 2181 should be the port for the Zookeeper if I'm not wrong. Try the same but with the default port of Kafka, 9092.
Upvotes: 5