Related Documents
Document Properties
Kbid29T787
Last Modified04-Feb-2021
Added to KB04-Feb-2021
Public AccessEveryone
StatusOnline
Doc TypeGuidelines, Concepts & Cookbooks
ProductICM 7.10

Cookbook - Solr Cloud Server

1 Introduction

This cookbook contains recipes for frequently asked questions about the Solr server deployment.

1.1 References

2 Recipe: Zookeeper IOExceptions "Unreasonable Length" or "Len Error"

2.1 Problem

There are Zookeeper IOExceptions similar to the following:

org.apache.zookeeper.ClientCnxn; Session 0x10166d8b6020002 for server xxxxxxxxxx:2181, unexpected error, closing socket connection and attempting reconnect => java.io.IOException: Unreasonable length = 1491656
        at org.apache.jute.BinaryInputArchive.checkLength(BinaryInputArchive.java:127)
java.io.IOException: Unreasonable length = 1491656
        at org.apache.jute.BinaryInputArchive.checkLength(BinaryInputArchive.java:127) 
        at org.apache.jute.BinaryInputArchive.readBuffer(BinaryInputArchive.java:92)
        at org.apache.zookeeper.proto.GetDataResponse.deserialize(GetDataResponse.java:56) 
        at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:919)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:101) 
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:363)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1223) 

2.2 Solution

The exceptions occur if configuration files are too big to be stored in Zookeeper by default. The default size is 1MB.

To increase the size, set the jute.maxbuffer system property for the startup of the Zookeeper server, the Solr server and the ICM application server.

2.3 Discussion

It is important to set the system property consistently in all servers and clients that upload or download such configuration files. The value of the system property specifies the maximum size in bytes.

  1. Add JVMFLAGS to zookeeper-env.sh for the Zookeeper server:

    zookeeper-env.sh
    JVMFLAGS=-Djute.maxbuffer=2097152
  2. Add the SOLR_OPTS to solr.in.sh for the Solr server:

    /etc/default/solr.in.sh
    SOLR_OPTS="$SOLR_OPTS -Djute.maxbuffer=2097152

    Note

    This setting applies to the Solr server startup only. It does not apply to the solr zk command line utility.
  3. If the added configuration files are part of the default configuration in share/system/config/cluster/solrcloud which is initially uploaded from the ICM application server, you have to add the jute.maxbuffer system property to the ICM application server(s):

    settings.gradle
    	jvmArgs {
        	additionalJvmArgs = [ '-Djute.maxbuffer=2097152' ]
    	}

3 Recipe: Use Basic Authentication for ICM - Solr Cloud Server Communication

3.1 Problem

During index builds the following error might occur: "Can't create a configset with an unauthenticated request from a trusted baseConfigSet".

How do I solve this error?

3.2 Solution

Starting with Solr 8.6.3, the Solr server refuses to create a config set from a base config set if the user that communicates with the Solr server is an unauthenticated user. To solve this problem, you can switch to basic authentication.

It is also possible to solve this issue by disabling the required authentication of the config set upload by setting the system property solr.disableConfigSetsCreateAuthChecks=true at the Solr server startup.

3.3 Discussion

The setup of basic authentication requires the following steps:

  1. Add (upload) a security.json to the Solr server.
    There is a security-sample.json provided in the installation of the Solr Cloud Adapter that is located in share/system/config/cluster/solrcloud. In that sample file, there are two users: solr with password SolrRocks and intershop with password !InterShop00!
    To upload the security.json, you can use the zkcli.sh/zkcli.bat script provided with the Solr server installation located in server/scripts/cloud-scripts:

    zkcli putfile
    zkcli.sh -zkhost localhost:2181/solr8 -cmd putfile /security.json security-sample.json
  2. Configure ICM to use basic authentication when communicating with the Solr server:

    settings.gradle
    	jvmArgs {
    		additionalJvmArgs = ['"-Dsolr.httpclient.builder.factory=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory" "-Dsolr.httpclient.config=%IS_SHARE%/system/config/cluster/solrcloud/solr-authentification.properties"']
        }

    This configuration example uses the provided solr-authentification.properties to use the user intershop with password !InterShop00! that corresponds with the user that is contained in the security.json.

  3. Change the default passwords, see Solr Ref Guide 6.6 | Editing Authentication Plugin Configuration.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Tickets