title: SOLR Zookeeper CLI failing - IOException Packet len is out of range
body: <p>I wanted to run Security Authentication and Authorization in SOLR 5.3.1 and placed the security.json file in solr root folder but on running the CLI as below :</p>
  
  <pre><code>/cygdrive/c/xampp/htdocs/solr$ server/scripts/cloud-scripts/zkcli.bat -zkhost localhost:8983 -cmd putfile  /security.json security.json
  </code></pre>
  
  <p>I am getting the below issue : </p>
  
  <pre><code>WARN  - 2015-10-29 15:39:01.656; org.apache.zookeeper.ClientCnxn$SendThread;      Session 0x0 for server frontend.dev/127.0.0.1:8983, unexpected error, closing socket connection and attempting reconnect
  java.io.IOException: Packet len1213486160 is out of range!
      at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112)
      at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79)
      at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
      at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
  </code></pre>
  
  <p>I run through the below article : </p>
  
  <p><a href="https://stackoverflow.com/questions/10249579/zookeeper-cli-failing-ioexception-packet-len12343123123-is-out-of-range">Zookeeper CLI failing - IOException Packet &lt;len12343123123&gt; is out of range</a></p>
  
  <p>I followed the instruction to increase the buffer size.I increased it as below for zkcli.bat . The command is as below : </p>
  
  <h2>zkcli.bat</h2>
  
  <pre><code>@echo off
  REM You can override pass the following parameters to this script:
  REM 
  
  set JVM=java
  
  REM  Find location of this script
  
  set SDIR=%~dp0
  if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1%
  "%JVM%" -Dlog4j.configuration="file:%SDIR%\log4j.properties" -Djute.maxbuffer="20213486160" -classpath "%SDIR%\..\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\..\lib\ext\*" org.apache.solr.cloud.ZkCLI %*
  </code></pre>
  
  <p>even I set the maxClientCnxns,minSessionTimeout and maxSessionTimeout in zoo.cfg under server\solr : </p>
  
  <h2>zoo.cfg</h2>
  
  <pre><code>tickTime=2000
  initLimit=10
  syncLimit=5
  maxClientCnxns=500
  minSessionTimeout=100000
  maxSessionTimeout=200000
  </code></pre>
  
  <p>security.json file is as follows : </p>
  
  <pre><code>{
  "authentication":{
  "class":"solr.BasicAuthPlugin",
  "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=     Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
  },
  "authorization":{
  "class":"solr.RuleBasedAuthorizationPlugin",
  "user-role":{"solr":"admin"},
  "permissions":[{"name":"security-edit",
                "role":"admin"}]
  }}
  </code></pre>
  
  <p>I googled but aint get any solution.Please kindly assist what I need to do to make the security authentication and authorization work in SOLR.</p>