title: zookeeper - [NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856
body: <p>I am trying to insttall zookeeper in my Windows. I am getting the error bellow no matter which suggestion I followed in <a href="https://stackoverflow.com/questions/35561723/zookeeper-kafka-unable-to-create-data-directory">zookeeper + Kafka - Unable to create data directory</a>.</p>
  
  <p>I am running it as Administrator and I have tried all these options:</p>
  
  <pre><code>#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
  </code></pre>
  
  <p>I don´t think it is relevant but let me add here: I have Java 11.</p>
  
  <p>Any idea why it is happening will be appreciated.</p>
  
  <p>Full logs</p>
  
  <pre><code>C:\Windows\system32&gt;zkserver
  
  C:\Windows\system32&gt;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=&lt;NA&gt;
  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)
  </code></pre>
  
  <p>*** Edited</p>
  
  <p><a href="https://i.stack.imgur.com/HQLfS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HQLfS.png" alt="enter image description here"></a></p>
  
  <p>*** edited</p>
  
  <p><a href="https://i.stack.imgur.com/Qw3NI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qw3NI.png" alt="enter image description here"></a></p>
  
  <p>*** The answer to my question is "you can ignore the fact that I get an error while curl 127.0.0.1:port. Kafka is working anyway.</p>
  
  <p><a href="https://i.stack.imgur.com/yMy35.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yMy35.png" alt="enter image description here"></a></p>