apachekafka放弃我的生产者和消费者

eit6fx6z  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(357)

我对Apache·Kafka有一个不可预知的重大问题。我使用的是kafka0.8,运行了几个小时后,它开始删除我的应用程序。特别是制片人。
这种行为是不可预测的,我无法始终如一地重现。
我的操作系统是mac操作系统
我正在使用Java7(producer是一个web应用程序)
我在9092和9093的同一个盒子上运行两个主题和两个服务器
我在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)

这是我在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)

我做错什么了?

ldfqzlk8

ldfqzlk81#

日志显示zookeeper正在临时断开连接,请增加zookeeper超时值

相关问题