Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

kafka.common.LeaderNotAvailableException #42

Closed
JeroenNieuwenhuis opened this issue Jun 1, 2016 · 1 comment
Closed

kafka.common.LeaderNotAvailableException #42

JeroenNieuwenhuis opened this issue Jun 1, 2016 · 1 comment

Comments

@JeroenNieuwenhuis
Copy link

I get a LeaderNotAvailableException when I use the console producer from the docker host. I'm on Fedora and start the container like this:
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=127.0.0.1 --env ADVERTISED_PORT=9092 spotify/kafka

Then I try to write to it:
./kafka-console-producer.sh --broker-list localhost:9092 --topic test

resulting in:
WARN Error while fetching metadata [{TopicMetadata for topic test -> No partition metadata for topic test due to kafka.common.LeaderNotAvailableException}] for topic [test]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo) [2016-06-01 09:57:20,149] WARN Error while fetching metadata [{TopicMetadata for topic test -> No partition metadata for topic test due to kafka.common.LeaderNotAvailableException}] for topic [test]: class kafka.common.LeaderNotAvailableException (kafka.producer.BrokerPartitionInfo) [2016-06-01 09:57:20,149] ERROR Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: test (kafka.producer.async.DefaultEventHandler)

What am I doing wrong?

@JeroenNieuwenhuis
Copy link
Author

Nevermind on this one. Apperantly it starts really slow and Kafka wasn't ready yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant