zookeeper - NIOServerCnxn @ 383] - 导致会话0x0关闭的异常:Len错误1195725856

问题描述 投票:2回答:1

我想在我的Windows中安装zookeeper。无论我在qazxsw poi中遵循哪个建议,我都会收到错误。

我以管理员身份运行它,我尝试了所有这些选项:

zookeeper + Kafka - Unable to create data directory

我不认为它是相关的,但让我在这里补充:我有Java 11。

任何想法为什么会发生将不胜感激。

完整日志

#dataDir=/tmp/zookeeper
#dataDir=:\zookeeper-3.4.14\
#dataDir=C:\\_d\\WSs\\kafka\\zookeeper-3.4.14\\data
#dataDir=:\\\\zookeeper\\\\data
dataDir=C:\\_d\\WSs\\kafka\\zookeeper-3.4.14

***编辑

C:\Windows\system32>zkserver C:\Windows\system32>call "C:\Program Files\Java\jdk-11.0.2"\bin\java "-Dzookeeper.log.dir=C:\_d\WSs\kafka\zookeeper-3.4.14\bin\.." "-Dzookeeper.root.logger=INFO,CONSOLE" -cp "C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\build\classes;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\build\lib\*;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\*;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\*;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\conf\zoo.cfg" 2019-04-18 15:17:42,629 [myid:] - INFO [main:QuorumPeerConfig@136] - Reading configuration from: C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\conf\zoo.cfg 2019-04-18 15:17:42,644 [myid:] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3 2019-04-18 15:17:42,644 [myid:] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0 2019-04-18 15:17:42,644 [myid:] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled. 2019-04-18 15:17:42,644 [myid:] - WARN [main:QuorumPeerMain@116] - Either no config or no quorum defined in config, running in standalone mode 2019-04-18 15:17:42,769 [myid:] - INFO [main:QuorumPeerConfig@136] - Reading configuration from: C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\conf\zoo.cfg 2019-04-18 15:17:42,769 [myid:] - INFO [main:ZooKeeperServerMain@98] - Starting server 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:zookeeper.version=3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:host.name=DESKTOP-AKCNE7F 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:java.version=11.0.2 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:java.vendor=Oracle Corporation 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:java.home=C:\Program Files\Java\jdk-11.0.2 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:java.class.path=C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\build\classes;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\build\lib\*;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\zookeeper-3.4.14.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\audience-annotations-0.5.0.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\jline-0.9.94.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\log4j-1.2.17.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\netty-3.10.6.Final.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\slf4j-api-1.7.25.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\lib\slf4j-log4j12-1.7.25.jar;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\..\conf 2019-04-18 15:17:47,344 [myid:] - INFO [main:Environment@100] - Server environment:java.library.path=C:\Program Files\Java\jdk-11.0.2\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Java\jdk-11.0.2\bin;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\_d\tools\apache-maven-3.6.0\bin;C:\_d\WSs\kafka\zookeeper-3.4.14\bin\;C:\Users\jimis\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\jimis\AppData\Local\Programs\Python\Python37-32\;C:\Users\jimis\AppData\Local\Microsoft\WindowsApps;. 2019-04-18 15:17:47,360 [myid:] - INFO [main:Environment@100] - Server environment:java.io.tmpdir=C:\Users\jimis\AppData\Local\Temp\ 2019-04-18 15:17:47,360 [myid:] - INFO [main:Environment@100] - Server environment:java.compiler=<NA> 2019-04-18 15:17:47,360 [myid:] - INFO [main:Environment@100] - Server environment:os.name=Windows 10 2019-04-18 15:17:47,360 [myid:] - INFO [main:Environment@100] - Server environment:os.arch=amd64 2019-04-18 15:17:47,376 [myid:] - INFO [main:Environment@100] - Server environment:os.version=10.0 2019-04-18 15:17:47,376 [myid:] - INFO [main:Environment@100] - Server environment:user.name=jimis 2019-04-18 15:17:47,376 [myid:] - INFO [main:Environment@100] - Server environment:user.home=C:\Users\jimis 2019-04-18 15:17:47,376 [myid:] - INFO [main:Environment@100] - Server environment:user.dir=C:\Windows\system32 2019-04-18 15:17:47,391 [myid:] - INFO [main:ZooKeeperServer@836] - tickTime set to 2000 2019-04-18 15:17:47,391 [myid:] - INFO [main:ZooKeeperServer@845] - minSessionTimeout set to -1 2019-04-18 15:17:47,391 [myid:] - INFO [main:ZooKeeperServer@854] - maxSessionTimeout set to -1 2019-04-18 15:17:47,782 [myid:] - INFO [main:ServerCnxnFactory@117] - Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory 2019-04-18 15:17:47,797 [myid:] - INFO [main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:2181 2019-04-18 15:18:00,365 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@222] - Accepted socket connection from /127.0.0.1:54057 2019-04-18 15:18:00,375 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@222] - Accepted socket connection from /127.0.0.1:54058 2019-04-18 15:18:00,378 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856 2019-04-18 15:18:00,379 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /127.0.0.1:54057 (no session established for client)

***编辑

enter image description here

***我的问题的答案是“你可以忽略我在卷曲127.0.0.1:port时出错的事实.Kafka无论如何都在工作。

enter image description here

apache-zookeeper java-11
1个回答
2
投票

您是否尝试针对zookeeper客户端端口执行“HTTP GET”?

因此错误来自enter image description here,它期望4个字母的命令或缓冲区,其中前4个字节代表大小。

十六进制的数字1195725856是0x47455420,在ASCII中是“GET”。

因此,当您尝试“对抗2181端口进行HTTP GET时,会导致错误消息。

NIOServerCnxn.java:readLength

这个$ curl http://0.0.0.0:2181/ curl: (52) Empty reply from server $ sudo tail /var/log/zookeeper/zookeeper.out ... 2019-04-19 12:56:25,303 [myid:3] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted 2019-04-19 12:56:25,304 [myid:3] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856 2019-04-19 12:56:25,304 [myid:3] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1040] - Closed socket connection for client /127.0.0.1:33011 (no session established for client) 消息是可以安全忽略的,因为ZooKeeper将关闭WARN响应隐含的客户端会话。

© www.soinside.com 2019 - 2024. All rights reserved.