You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Emanuele Blanco <em...@gmail.com> on 2015/07/05 11:32:56 UTC

failing to fetch topic metadata

Hi,

When trying to send a message to a local Kafka (created via
KafkaServerStartable), I'm getting loads of

 (Logging.scala:83) - Error while fetching metadata [{TopicMetadata for
topic test_topic ->
No partition metadata for topic test_topic due to
kafka.common.LeaderNotAvailableException}] for topic [test_topic]: class
kafka.common.LeaderNotAvailableException

and I'm failing to send the message. I started ZooKeeper using
NIOServerCnxnFactory and a standalone ZooKeeperServer. I set
advertised.host.name in the Kafka properties and I've been using 127.0.0.1
everywhere instead of localhost to avoid ipv6 problems.

>From what I can see from the logs though - available at
https://gist.github.com/manub/06b5beedf6ece9701655 - the topic is created,
but somehow I'm not able to get the metadata while sending a message.

Any suggestions in what I'm doing wrong?

Many thanks

Emanu
​​
ele Blanco
Twitter - @manub <http://twitter.com/manub>

Re: failing to fetch topic metadata

Posted by Stevo Slavić <ss...@gmail.com>.
Hello Emanuele,

>From logs it seems that auto.create.topics.enable is not overriden for the
embedded broker.
It also seems that test is explicitly creating topic before publishing
message to it.
Consider commenting out explicit topic creation and rely on implicit topic
creation.

Kind regards,
Stevo Slavic.

On Sun, Jul 5, 2015 at 11:32 AM, Emanuele Blanco <em...@gmail.com>
wrote:

> Hi,
>
> When trying to send a message to a local Kafka (created via
> KafkaServerStartable), I'm getting loads of
>
>  (Logging.scala:83) - Error while fetching metadata [{TopicMetadata for
> topic test_topic ->
> No partition metadata for topic test_topic due to
> kafka.common.LeaderNotAvailableException}] for topic [test_topic]: class
> kafka.common.LeaderNotAvailableException
>
> and I'm failing to send the message. I started ZooKeeper using
> NIOServerCnxnFactory and a standalone ZooKeeperServer. I set
> advertised.host.name in the Kafka properties and I've been using 127.0.0.1
> everywhere instead of localhost to avoid ipv6 problems.
>
> From what I can see from the logs though - available at
> https://gist.github.com/manub/06b5beedf6ece9701655 - the topic is created,
> but somehow I'm not able to get the metadata while sending a message.
>
> Any suggestions in what I'm doing wrong?
>
> Many thanks
>
> Emanu
> ​​
> ele Blanco
> Twitter - @manub <http://twitter.com/manub>
>