Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka, mail # user - How to create the initial zookeeper chroot path for zk.connect?


Copy link to this message
-
How to create the initial zookeeper chroot path for zk.connect?
Ryan Chan 2013-04-17, 16:30
Sorry as I am new to Kafka/ZK, but the instruction seems not clear..

In the config, it was said that we can use a chroot-ed ZK (
http://kafka.apache.org/configuration.html), e.g. localhost:2181/kafka

But when I start the Kafka using the setting, it was showing..

java.lang.IllegalArgumentException: Path length must be > 0
at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:48)
at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:35)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:626)
at org.I0Itec.zkclient.ZkConnection.create(ZkConnection.java:87)
at org.I0Itec.zkclient.ZkClient$1.call(ZkClient.java:308)
at org.I0Itec.zkclient.ZkClient$1.call(ZkClient.java:304)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:675)
at org.I0Itec.zkclient.ZkClient.create(ZkClient.java:304)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:213)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:223)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:223)
at kafka.utils.ZkUtils$.createParentPath(ZkUtils.scala:47)
at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:59)
at kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
at kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
at kafka.log.LogManager.startup(LogManager.scala:130)
at kafka.server.KafkaServer.startup(KafkaServer.scala:81)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)
at kafka.Kafka$.main(Kafka.scala:47)
at kafka.Kafka.main(Kafka.scala)

In an old post (
http://mail-archives.apache.org/mod_mbox/incubator-kafka-users/201205.mbox/%3CCAK152briB=M-OaeaQtCz+[EMAIL PROTECTED]%3E)
it was saying I need to create the path first, so I use zkCli.sh to connect
to the ZK, and run the command

>> create /kafka ''

I restarted the Kafka and still the same error, any idea?

Thanks.

 
+
Neha Narkhede 2013-04-17, 17:30
+
Ryan Chan 2013-04-18, 03:03
+
Neha Narkhede 2013-04-18, 21:32
+
Ryan Chan 2013-04-19, 05:47
+
Jonathan Creasy 2013-04-19, 05:51
+
Neha Narkhede 2013-04-19, 16:08
+
Ryan Chan 2013-04-20, 03:55
+
Neha Narkhede 2013-04-20, 05:03
+
Ryan Chan 2013-04-20, 09:24
+
Neha Narkhede 2013-04-20, 16:03
+
Scott Clasen 2013-04-20, 18:30
+
Ryan Chan 2013-04-21, 08:34
+
Scott Clasen 2013-04-21, 15:11
+
Ryan Chan 2013-04-22, 13:46
+
Jason Rosenberg 2013-05-08, 23:31
+
Jason Rosenberg 2013-05-08, 23:38
+
Jun Rao 2013-05-09, 04:28