Looks like you try to delete a topic that is already in the process of
getting deleted:
NodeExists for /admin/delete_topics/testTopic17

(We can improve the error messages for sure, or maybe even catch the
exception and ignore it)

Gwen

On Thu, Jul 16, 2015 at 3:40 PM, Sivananda Reddy
<sivananda2...@gmail.com> wrote:
> Hi,
>
> As per the jira https://issues.apache.org/jira/browse/KAFKA-1737, I have
> set ZKStringSerializer, while creating the ZkClient and still the delete
> topic function call is not working:
>
> Version: kafka_2.11-0.8.2.1
>
> *My code looks like this*:
> ZkClient zkClient = new ZkClient("localhost:2181", 6000, 6000,
> ZKStringSerializer$.MODULE$);
> AdminUtils.deleteTopic(zkClient, "testTopic17");
>
> *I am getting the following exception's*:
> Exception in thread "main"
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /admin/delete_topics/testTopic17
>     at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:55)
>     at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:685)
>     at org.I0Itec.zkclient.ZkClient.create(ZkClient.java:304)
>     at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:243)
>     at kafka.utils.ZkUtils$.createPersistentPath(ZkUtils.scala:306)
>     at kafka.admin.AdminUtils$.deleteTopic(AdminUtils.scala:159)
>     at kafka.admin.AdminUtils.deleteTopic(AdminUtils.scala)
>     at Test.deleteTopic(Test.java:98)
>     at Test.main(Test.java:76)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /admin/delete_topics/testTopic17
>     at org.apache.zookeeper.KeeperException.create(KeeperException.java:119)
>     at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
>     at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
>     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)
>     ... 7 more
>
> *The corresponding zookeeper logs*:
> [2015-07-16 15:31:14,383] INFO Accepted socket connection from /
> 127.0.0.1:23363 (org.apache.zookeeper.server.NIOServerCnxnFactory)
> [2015-07-16 15:31:14,385] INFO Client attempting to establish new session
> at /127.0.0.1:23363 (org.apache.zookeeper.server.ZooKeeperServer)
> [2015-07-16 15:31:14,391] INFO Established session 0x14e98d2ce98000c with
> negotiated timeout 6000 for client /127.0.0.1:23363
> (org.apache.zookeeper.server.ZooKeeperServer)
> [2015-07-16 15:31:14,510] INFO Got user-level KeeperException when
> processing sessionid:0x14e98d2ce98000c type:create cxid:0x1 zxid:0x963
> txntype:-1 reqpath:n/a Error Path:/admin/delete_topics/testTopic17
> Error:KeeperErrorCode = NodeExists for /admin/delete_topics/testTopic17
> (org.apache.zookeeper.server.PrepRequestProcessor)
> [2015-07-16 15:31:14,842] WARN caught end of stream exception
> (org.apache.zookeeper.server.NIOServerCnxn)
> EndOfStreamException: Unable to read additional data from client sessionid
> 0x14e98d2ce98000c, likely client has closed socket
>     at
> org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228)
>     at
> org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
>     at java.lang.Thread.run(Thread.java:744)
> [2015-07-16 15:31:14,843] INFO Closed socket connection for client /
> 127.0.0.1:23363 which had sessionid 0x14e98d2ce98000c
> (org.apache.zookeeper.server.NIOServerCnxn)
> [2015-07-16 15:31:21,000] INFO Expiring session 0x14e98d2ce98000c, timeout
> of 6000ms exceeded (org.apache.zookeeper.server.ZooKeeperServer)
> [2015-07-16 15:31:21,001] INFO Processed session termination for sessionid:
> 0x14e98d2ce98000c (org.apache.zookeeper.server.PrepRequestProcessor)
>
> Could someone please let me know if I am missing anything?
>
> Thank you,
> Siva.

Reply via email to