0

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 :

/cygdrive/c/xampp/htdocs/solr$ server/scripts/cloud-scripts/zkcli.bat -zkhost localhost:8983 -cmd putfile  /security.json security.json

I am getting the below issue :

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)

I run through the below article :

Zookeeper CLI failing - IOException Packet <len12343123123> is out of range

I followed the instruction to increase the buffer size.I increased it as below for zkcli.bat . The command is as below :

zkcli.bat

@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 %*

even I set the maxClientCnxns,minSessionTimeout and maxSessionTimeout in zoo.cfg under server\solr :

zoo.cfg

tickTime=2000
initLimit=10
syncLimit=5
maxClientCnxns=500
minSessionTimeout=100000
maxSessionTimeout=200000

security.json file is as follows :

{
"authentication":{
"class":"solr.BasicAuthPlugin",
"credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=     Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
"class":"solr.RuleBasedAuthorizationPlugin",
"user-role":{"solr":"admin"},
"permissions":[{"name":"security-edit",
              "role":"admin"}]
}}

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.

Community
  • 1
  • 1
Borah Anurup
  • 43
  • 1
  • 6

1 Answers1

1

I had the same problem, but in my case was that solr 6 was running on normal mode and not in cluster mode. To run solr in cluster mode you need the -c flag. Then the zookeeper was running on port 911.

./solr status

And see if you have a zookeeper running and in which port

Jorge Mendes
  • 388
  • 3
  • 14