You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Neha Narkhede (Created) (JIRA)" <ji...@apache.org> on 2011/10/07 18:51:30 UTC
[jira] [Created] (KAFKA-150) Confusing NodeExistsException failing
kafka broker startup
Confusing NodeExistsException failing kafka broker startup
----------------------------------------------------------
Key: KAFKA-150
URL: https://issues.apache.org/jira/browse/KAFKA-150
Project: Kafka
Issue Type: Improvement
Components: core
Affects Versions: 0.7
Reporter: Neha Narkhede
Fix For: 0.8
Sometimes, broker startup fails with the following exception
[2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
(kafka.network.Acceptor)
[2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
(kafka.server.KafkaZooKeeper)
[2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
[2011-10-03 15:33:22,230] FATAL
org.I0Itec.zkclient.exception.ZkNodeExistsException:
org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
[2011-10-03 15:33:22,231] FATAL
org.I0Itec.zkclient.exception.ZkNodeExistsException:
org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
NodeExists for /brokers/ids/0
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.createEphemeral(ZkClient.java:328)
at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
at
kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
at
kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
at kafka.log.LogManager.startup(LogManager.scala:122)
at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
at
kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
at kafka.Kafka$.main(Kafka.scala:56)
at kafka.Kafka.main(Kafka.scala)
Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
KeeperErrorCode = NodeExists for /brokers/ids/0
at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
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)
... 10 more
(kafka.server.KafkaServer)
[2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
[2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
(kafka.utils.KafkaScheduler)
[2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
(kafka.utils.KafkaScheduler)
[2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
[2011-10-03 15:33:22,482] INFO Closing zookeeper client...
(kafka.server.KafkaZooKeeper)
[2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
(org.I0Itec.zkclient.ZkEventThread)
There could be 3 things that might have happened
(1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
(2) you have two brokers with the same id,
(3) zk has a bug and is not deleting ephemeral nodes.
Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KAFKA-150) Confusing NodeExistsException failing
kafka broker startup
Posted by "Jay Kreps (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jay Kreps updated KAFKA-150:
----------------------------
Status: Patch Available (was: Open)
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-150) Confusing NodeExistsException
failing kafka broker startup
Posted by "Chris Burroughs (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134365#comment-13134365 ]
Chris Burroughs commented on KAFKA-150:
---------------------------------------
trunk is still 0.7, right?
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-150) Confusing NodeExistsException
failing kafka broker startup
Posted by "Jun Rao (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133824#comment-13133824 ]
Jun Rao commented on KAFKA-150:
-------------------------------
In KafkaZooKeeper.registerBrokerInZk, in the case statement, we need to rethrow exceptions other than ZkNodeExistsException.
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KAFKA-150) Confusing NodeExistsException failing
kafka broker startup
Posted by "Jay Kreps (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jay Kreps updated KAFKA-150:
----------------------------
Attachment: KAFKA-150.patch
Now produces the following error:
[2011-10-23 21:16:53,635] FATAL Fatal error during startup. (kafka.server.KafkaServer)
java.lang.RuntimeException: A broker is already registered on the path /brokers/ids/0. This probably indicates that you either have configured a brokerid that is already in use, or else you have shutdown this broker and restarted it faster than the zookeeper timeout so it appears to be re-registering.
at kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:60)
at kafka.log.LogManager.startup(LogManager.scala:123)
at kafka.server.KafkaServer.startup(KafkaServer.scala:79)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:46)
at kafka.Kafka$.main(Kafka.scala:60)
at kafka.Kafka.main(Kafka.scala)
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-150) Confusing NodeExistsException
failing kafka broker startup
Posted by "Jun Rao (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133833#comment-13133833 ]
Jun Rao commented on KAFKA-150:
-------------------------------
+1 on the patch.
I thought the try/catch thing in scala is just a special case of match/case.
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KAFKA-150) Confusing NodeExistsException failing
kafka broker startup
Posted by "Jay Kreps (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jay Kreps updated KAFKA-150:
----------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-150) Confusing NodeExistsException
failing kafka broker startup
Posted by "Neha Narkhede (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134378#comment-13134378 ]
Neha Narkhede commented on KAFKA-150:
-------------------------------------
Good point. Changed the fixed version to 0.7
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.7
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KAFKA-150) Confusing NodeExistsException failing
kafka broker startup
Posted by "Neha Narkhede (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neha Narkhede updated KAFKA-150:
--------------------------------
Fix Version/s: (was: 0.8)
0.7
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.7
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (KAFKA-150) Confusing NodeExistsException failing
kafka broker startup
Posted by "Jay Kreps (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jay Kreps reassigned KAFKA-150:
-------------------------------
Assignee: Jay Kreps
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-150) Confusing NodeExistsException
failing kafka broker startup
Posted by "Jay Kreps (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133831#comment-13133831 ]
Jay Kreps commented on KAFKA-150:
---------------------------------
Hmm, good thinking. But actually I don't think that is how try/catch works in scala. It just catches the exception you specify. So what I have there is equivalent to
try {
...
} catch (ZkNodeExistsException e) {...}
I tested this out just to be sure, and it does seem to work that way (which is good because otherwise every single try/catch would have to remember to rethrow).
scala> jkreps-mn:kafka-trunk jkreps$ scala
Welcome to Scala version 2.8.0.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_22).
Type in expressions to have them evaluated.
Type :help for more information.
scala> try {
| throw new Exception("")
| } catch {
| case e: RuntimeException => println("gotcha")
| }
java.lang.Exception:
at .liftedTree1$1(<console>:7)
at .<init>(<console>:6)
at .<clinit>(<console>)
at RequestResult$.<init>(<console>:9)
at RequestResult$.<clinit>(<console>)
at RequestResult$scala_repl_result(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun$apply$18.apply(Interpreter.scala:981)
at scala.util.control.Exception$Catch.apply(Exception.scala:...
> Confusing NodeExistsException failing kafka broker startup
> ----------------------------------------------------------
>
> Key: KAFKA-150
> URL: https://issues.apache.org/jira/browse/KAFKA-150
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.7
> Reporter: Neha Narkhede
> Assignee: Jay Kreps
> Fix For: 0.8
>
> Attachments: KAFKA-150.patch
>
>
> Sometimes, broker startup fails with the following exception
> [2011-10-03 15:33:22,193] INFO Awaiting connections on port 9092
> (kafka.network.Acceptor)
> [2011-10-03 15:33:22,193] INFO Registering broker /brokers/ids/0
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,229] INFO conflict in /brokers/ids/0 data:
> 10.98.20.109-1317681202194:10.98.20.109:9092 stored data:
> 10.98.20.109-1317268078266:10.98.20.109:9092 (kafka.utils.ZkUtils$)
> [2011-10-03 15:33:22,230] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0 (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] FATAL
> org.I0Itec.zkclient.exception.ZkNodeExistsException:
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists for /brokers/ids/0
> 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.createEphemeral(ZkClient.java:328)
> at kafka.utils.ZkUtils$.createEphemeralPath(ZkUtils.scala:55)
> at
> kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(ZkUtils.scala:71)
> at
> kafka.server.KafkaZooKeeper.registerBrokerInZk(KafkaZooKeeper.scala:54)
> at kafka.log.LogManager.startup(LogManager.scala:122)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:77)
> at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40)
> at kafka.Kafka$.main(Kafka.scala:56)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: org.apache.zookeeper.KeeperException$NodeExistsException:
> KeeperErrorCode = NodeExists for /brokers/ids/0
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
> 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)
> ... 10 more
> (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,231] INFO Shutting down... (kafka.server.KafkaServer)
> [2011-10-03 15:33:22,232] INFO shutdown scheduler kafka-logcleaner-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,239] INFO shutdown scheduler kafka-logflusher-
> (kafka.utils.KafkaScheduler)
> [2011-10-03 15:33:22,481] INFO zkActor stopped (kafka.log.LogManager)
> [2011-10-03 15:33:22,482] INFO Closing zookeeper client...
> (kafka.server.KafkaZooKeeper)
> [2011-10-03 15:33:22,482] INFO Terminate ZkClient event thread.
> (org.I0Itec.zkclient.ZkEventThread)
> There could be 3 things that might have happened
> (1) you restarted kafka within the zk timeout, in which case as far as zk is concerned your old broker still exists...this is weird but actually correct behavior,
> (2) you have two brokers with the same id,
> (3) zk has a bug and is not deleting ephemeral nodes.
> Instead of just throwing the ZK NodeExistsException, we should include the above information in a well-named Kafka exception, for clarity.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira