Apache Kafka is dumping my producers and consumers
I have a basic unpredictable problem with Apache Kafka. I am using Kafka 0.8 and after a couple of hours of work it starts to drop my applications. Specially manufacturer.
The behavior is unpredictable and I cannot consistently reproduce it.
- My OS is Mac OS
- I am using Java 7 (Producer is a web application)
- I am running two themes and two servers in the same window at 9092 and 9093
I see the following errors in Zookeeper
EndOfStreamException: Unable to read additional data from client sessionid 0x14d1b94a22d001b, 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:745)
[2015-05-03 20:35:37,988] INFO Closed socket connection for client /0:0:0:0:0:0:0:1:60236 which had sessionid 0x14d1b94a22d001b (org.apache.zookeeper.server.NIOServerCnxn)
[2015-05-03 20:35:37,989] INFO Closed socket connection for client /127.0.0.1:60204 which had sessionid 0x14d1b94a22d0016 (org.apache.zookeeper.server.NIOServerCnxn)
[2015-05-03 20:35:37,989] WARN Ignoring unexpected runtime exception (org.apache.zookeeper.server.NIOServerCnxnFactory)
java.nio.channels.CancelledKeyException
at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87)
at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:187)
at java.lang.Thread.run(Thread.java:745)
And here is the error I see on server 9093
java.lang.IllegalStateException: Kafka scheduler has not been started
at kafka.utils.KafkaScheduler.ensureStarted(KafkaScheduler.scala:114)
at kafka.utils.KafkaScheduler.shutdown(KafkaScheduler.scala:86)
at kafka.controller.KafkaController.onControllerResignation(KafkaController.scala:350)
at kafka.controller.KafkaController$SessionExpirationListener$$anonfun$handleNewSession$1.apply$mcZ$sp(KafkaController.scala:1108)
at kafka.controller.KafkaController$SessionExpirationListener$$anonfun$handleNewSession$1.apply(KafkaController.scala:1107)
at kafka.controller.KafkaController$SessionExpirationListener$$anonfun$handleNewSession$1.apply(KafkaController.scala:1107)
at kafka.utils.Utils$.inLock(Utils.scala:535)
at kafka.controller.KafkaController$SessionExpirationListener.handleNewSession(KafkaController.scala:1107)
at org.I0Itec.zkclient.ZkClient$4.run(ZkClient.java:472)
at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)
What am I doing wrong?
+3
source to share