Ah I got it. A underscore is not allowed and the host address contained one (I 
did't posed the full name here).
 
Thanks for the quick help.

Best,
Sven

Gesendet: Montag, 08. August 2016 um 12:46 Uhr
Von: "Radoslaw Gruchalski" <ra...@gruchalski.com>
An: users@kafka.apache.org, users@kafka.apache.org
Cc: users@kafka.apache.org
Betreff: Re: Failed to parse the broker info from zookeeeper
The exception is:
Caused by: kafka.common.KafkaException: Unable to parse PLAINTEXT://sven:9092 
to a broker endpoint 
And it happens 
here:https://github.com/apache/kafka/blob/0.10.0/core/src/main/scala/kafka/cluster/EndPoint.scala#L47
Do you have any non-ASCII characters in your URI? Something in your host string 
causes the regex to fail: 
https://github.com/apache/kafka/blob/0.10.0/core/src/main/scala/kafka/cluster/EndPoint.scala#L29[https://github.com/apache/kafka/blob/0.10.0/core/src/main/scala/kafka/cluster/EndPoint.scala#L29]

--
Best regards,
Rad




On Mon, Aug 8, 2016 at 12:22 PM +0200, "Sven Ott" <ott.s...@gmx.net> wrote:











It fails in step 3: 
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 
--partitions 1 --topic test

Error while executing topic command : Failed to parse the broker info from 
zookeeper: 
{"jmx_port":9999,"timestamp":"1470650706921","endpoints":["PLAINTEXT://sven:9092"],"host":"sven","version":3,"port":9092}
[2016-08-08 12:05:12,266] ERROR kafka.common.KafkaException: Failed to parse 
the broker info from zookeeper: 
{"jmx_port":9999,"timestamp":"1470650706921","endpoints":["PLAINTEXT://sven:9092"],"host":"sven","version":3,"port":9092}
at kafka.cluster.Broker$.createBroker(Broker.scala:101)
at kafka.utils.ZkUtils.getBrokerInfo(ZkUtils.scala:787)
at 
kafka.utils.ZkUtils$$anonfun$getAllBrokersInCluster$2.apply(ZkUtils.scala:162)
at 
kafka.utils.ZkUtils$$anonfun$getAllBrokersInCluster$2.apply(ZkUtils.scala:162)
at 
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at 
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at 
scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at kafka.utils.ZkUtils.getAllBrokersInCluster(ZkUtils.scala:162)
at kafka.admin.AdminUtils$.getBrokerMetadatas(AdminUtils.scala:380)
at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:402)
at kafka.admin.TopicCommand$.createTopic(TopicCommand.scala:110)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:61)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
Caused by: kafka.common.KafkaException: Unable to parse PLAINTEXT://sven:9092 
to a broker endpoint
at kafka.cluster.EndPoint$.createEndPoint(EndPoint.scala:50)
at kafka.cluster.Broker$$anonfun$1.apply(Broker.scala:90)
at kafka.cluster.Broker$$anonfun$1.apply(Broker.scala:89)
at scala.collection.immutable.List.map(List.scala:273)
at kafka.cluster.Broker$.createBroker(Broker.scala:89)
... 15 more
(kafka.admin.TopicCommand$)

_______
The kafka-server process does not show any output after starting the topic 
process.

______
Whereas the zookeeper throws an KeeperException already before trying to 
generate a topic.

[2016-08-08 12:05:06,828] INFO Got user-level KeeperException when processing 
sessionid:0x156699ccfaa0000 type:delete cxid:0x20 zxid:0xf3 txntype:-1 
reqpath:n/a Error Path:/admin/preferred_replica_election Error:KeeperErrorCode 
= NoNode for /admin/preferred_replica_election 
(org.apache.zookeeper.server.PrepRequestProcessor)
[2016-08-08 12:05:06,923] INFO Got user-level KeeperException when processing 
sessionid:0x156699ccfaa0000 type:create cxid:0x27 zxid:0xf4 txntype:-1 
reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NodeExists for /brokers 
(org.apache.zookeeper.server.PrepRequestProcessor)
[2016-08-08 12:05:06,924] INFO Got user-level KeeperException when processing 
sessionid:0x156699ccfaa0000 type:create cxid:0x28 zxid:0xf5 txntype:-1 
reqpath:n/a Error Path:/brokers/ids Error:KeeperErrorCode = NodeExists for 
/brokers/ids (org.apache.zookeeper.server.PrepRequestProcessor)

And gives that output after trying to start the topic.

[2016-08-08 12:05:12,102] INFO Accepted socket connection from /127.0.0.1:41983 
(org.apache.zookeeper.server.NIOServerCnxnFactory)
[2016-08-08 12:05:12,104] INFO Client attempting to establish new session at 
/127.0.0.1:41983 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-08-08 12:05:12,169] INFO Established session 0x156699ccfaa0001 with 
negotiated timeout 30000 for client /127.0.0.1:41983 
(org.apache.zookeeper.server.ZooKeeperServer)
[2016-08-08 12:05:12,267] INFO Processed session termination for sessionid: 
0x156699ccfaa0001 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-08-08 12:05:12,332] INFO Closed socket connection for client 
/127.0.0.1:41983 which had sessionid 0x156699ccfaa0001 
(org.apache.zookeeper.server.NIOServerCnxn)

Thanks for helping me!

Best

Sven
 

Gesendet: Montag, 08. August 2016 um 10:04 Uhr
Von: "Jaikiran Pai"
An: users@kafka.apache.org
Betreff: Re: Failed to parse the broker info from zookeeeper
The quickstart step 2 has a couple of commands, which exact command
shows this exception and is there more in the exception, like an
exception stacktrace? Can you post that somehow?

-Jaikiran
On Monday 08 August 2016 12:46 PM, Sven Ott wrote:
> Hello everyone,
>
> I downloaded the latest Kafka verison and tried to run the quick start. 
> Unfortunately, I cannot open a topic after starting the zookeeper and kafka 
> server as described in step 2. The error
>
> Failed to parse the broker info from zookeeeper: {"jmx_port":-1, 
> "timestamp":"...", 
> "endpoints":["PLAINSTEXT://sven:9092]","host":"sven","version":3,"port":9092}
>
> appears.
>
> I analysied the source code and tried to find a solution with google, but I 
> could not found any helpful hint. Looks like I am the first one with that 
> kind of error what I cannot believe. What am I doing wrong? Is there another 
> tool missing?
>
> Best,
> Sven
 




 

Reply via email to