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

Switch to Threaded View
Kafka >> mail # user >> How to create the initial zookeeper chroot path for zk.connect?


Copy link to this message
-
Re: How to create the initial zookeeper chroot path for zk.connect?
After creating the path, did you get a chance to confirm that it got
created correctly ?

Thanks,
Neha

On Wed, Apr 17, 2013 at 9:30 AM, Ryan Chan <[EMAIL PROTECTED]> wrote:
> 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.