Reputation: 83
Following the getting started guide, I get the following error:
org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. (kafka.admin.TopicCommand$)
What I have done is start the two servers with the commands:
bin/zookeeper-server-start.sh config/zookeeper.properties
and
bin/kafka-server-start.sh config/server.properties
and then execute the following command, where I'm getting the error:
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
I'm running on macOS Mojave
When starting the Kafka server, I obtain this log:
[2019-12-08 17:50:53,929] INFO Got user-level KeeperException when processing sessionid:0x10002516aaf0000 type:create cxid:0x2 zxid:0x3 txntype:-1 reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)
[2019-12-08 17:50:53,957] INFO Got user-level KeeperException when processing sessionid:0x10002516aaf0000 type:create cxid:0x6 zxid:0x7 txntype:-1 reqpath:n/a Error Path:/config Error:KeeperErrorCode = NoNode for /config (org.apache.zookeeper.server.PrepRequestProcessor)
[2019-12-08 17:50:53,977] INFO Got user-level KeeperException when processing sessionid:0x10002516aaf0000 type:create cxid:0x9 zxid:0xa txntype:-1 reqpath:n/a Error Path:/admin Error:KeeperErrorCode = NoNode for /admin (org.apache.zookeeper.server.PrepRequestProcessor)
[2019-12-08 17:50:54,282] INFO Got user-level KeeperException when processing sessionid:0x10002516aaf0000 type:create cxid:0x15 zxid:0x15 txntype:-1 reqpath:n/a Error Path:/cluster Error:KeeperErrorCode = NoNode for /cluster (org.apache.zookeeper.server.PrepRequestProcessor)
[2019-12-08 17:50:55,247] INFO Got user-level KeeperException when processing sessionid:0x10002516aaf0000 type:multi cxid:0x37 zxid:0x1c txntype:-1 reqpath:n/a aborting remaining multi ops. Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NoNode for /admin/preferred_replica_election (org.apache.zookeeper.server.PrepRequestProcessor)
Upvotes: 1
Views: 10086
Reputation: 751
Apache Kafka comes with an incomplete configuration.
What worked for me is changing server.properties enabling the listeners parameter.
listeners=PLAINTEXT://localhost:9092
Please note that the example disabled line misses the hostname (listeners=://localhost:9092)
Upvotes: 3