运行Kafka Java项目的测试用例时,org.apache.zookeeper.server.ServerCnxn $ EndOfStreamException

时间:2017-09-06 10:24:51

标签: java apache-kafka apache-zookeeper

   <httpProtocol>
       <customHeaders>
           <add name="X-Frame-Options" value="SAMEORIGIN" />
       </customHeaders>
   </httpProtocol>

我已经查看了这些链接,其中讨论了类似的异常:

我尝试在zookeeper.properties文件中使用2017-09-06 11:58:16.380 WARN 8376 --- [ry:/127.0.0.1:0] o.apache.zookeeper.server.NIOServerCnxn : caught end of stream exception org.apache.zookeeper.server.ServerCnxn$EndOfStreamException: Unable to read additional data from client sessionid 0x15e55dfd1a70001, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) ~[zookeeper-3.4.9.jar:3.4.9-1757313] at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:203) [zookeeper-3.4.9.jar:3.4.9-1757313] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112] 2017-09-06 11:58:16.381 INFO 8376 --- [ry:/127.0.0.1:0] o.apache.zookeeper.server.NIOServerCnxn : Closed socket connection for client /127.0.0.1:53191 which had sessionid 0x15e55dfd1a70001 2017-09-06 11:58:16.427 INFO 8376 --- [127.0.0.1:53184] org.I0Itec.zkclient.ZkEventThread : Terminate ZkClient event thread. 2017-09-06 11:58:16.428 INFO 8376 --- [0 cport:53184):] o.a.z.server.PrepRequestProcessor : Processed session termination for sessionid: 0x15e55dfd1a70000 2017-09-06 11:58:16.494 INFO 8376 --- [ main] org.apache.zookeeper.ZooKeeper : Session: 0x15e55dfd1a70000 closed 2017-09-06 11:58:16.496 INFO 8376 --- [ main] o.a.zookeeper.server.ZooKeeperServer : shutting down 2017-09-06 11:58:16.497 ERROR 8376 --- [ main] o.a.zookeeper.server.ZooKeeperServer : ZKShutdownHandler is not registered, so ZooKeeper server won't take any action on ERROR or SHUTDOWN server state changes 2017-09-06 11:58:16.497 INFO 8376 --- [ main] o.a.zookeeper.server.SessionTrackerImpl : Shutting down 2017-09-06 11:58:16.497 INFO 8376 --- [ main] o.a.z.server.PrepRequestProcessor : Shutting down 2017-09-06 11:58:16.497 INFO 8376 --- [ main] o.a.z.server.SyncRequestProcessor : Shutting down 2017-09-06 11:58:16.494 INFO 8376 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn : EventThread shut down for session: 0x15e55dfd1a70000 2017-09-06 11:58:16.495 WARN 8376 --- [ry:/127.0.0.1:0] o.apache.zookeeper.server.NIOServerCnxn : caught end of stream exception org.apache.zookeeper.server.ServerCnxn$EndOfStreamException: Unable to read additional data from client sessionid 0x15e55dfd1a70000, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) ~[zookeeper-3.4.9.jar:3.4.9-1757313] at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:203) [zookeeper-3.4.9.jar:3.4.9-1757313] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112] 2017-09-06 11:58:16.498 INFO 8376 --- [ry:/127.0.0.1:0] o.apache.zookeeper.server.NIOServerCnxn : Closed socket connection for client /127.0.0.1:53187 which had sessionid 0x15e55dfd1a70000 2017-09-06 11:58:16.499 INFO 8376 --- [0 cport:53184):] o.a.z.server.PrepRequestProcessor : PrepRequestProcessor exited loop! 2017-09-06 11:58:16.499 INFO 8376 --- [ SyncThread:0] o.a.z.server.SyncRequestProcessor : SyncRequestProcessor exited! 2017-09-06 11:58:16.500 INFO 8376 --- [ main] o.a.z.server.FinalRequestProcessor : shutdown of request processor complete 2017-09-06 11:58:16.501 INFO 8376 --- [ry:/127.0.0.1:0] o.a.z.server.NIOServerCnxnFactory : NIOServerCnxn factory exited run method 2017-09-06 11:58:16.506 INFO 8376 --- [ SessionTracker] o.a.zookeeper.server.SessionTrackerImpl : SessionTrackerImpl exited loop! 2017-09-06 11:58:17.542 INFO 8376 --- [ Thread-9] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2de366bb: startup date [Wed Sep 06 11:58:09 IST 2017]; root of context hierarchy 2017-09-06 11:58:17.560 INFO 8376 --- [ Thread-9] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647 2017-09-06 11:58:17.560 INFO 8376 --- [ Thread-9] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0 ,因为我正在使用Kafka-setup-packaged-zookeeper。上面的JIRA门票中提到了这个解决方案。但例外情况仍然存在。

在我的情况下,有什么建议可能是什么解决方案?

0 个答案:

没有答案