Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16485

Solr 9 standalone mode nullPointerException when ShardHandlerFactory defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 9.0
    • 9.1, main (10.0)
    • None
    • None
    • Kubernetes using solr-operator 0.6.0

    Description

      Solr fails to create cores with a “NullPointerException" error when “shardHandlerFactory” is defined for any handlers in the solrconfig.xml file.

      Snippet from solrconfig.xml:

      <requestHandler name="/select" class="solr.SearchHandler" default="true”>
              <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
                  <int name="socketTimeout">${socketTimeout:800}</int>
                  <int name="connTimeout">${connTimeout:500}</int>
              </shardHandlerFactory>
      </requestHandler>

      Snippet of NullPointerException (full text here: https://justpaste.it/5lntq ):

      o

      lxeu-atlas-web-dist-solr-1  | Caused by: java.lang.NullPointerException
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.handler.component.HttpShardHandlerFactory.setSecurityBuilder(HttpShardHandlerFactory.java:299) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.handler.component.SearchHandler.inform(SearchHandler.java:185) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:722) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1155) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1048) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1560) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at org.apache.solr.core.CoreContainer.lambda$load$10(CoreContainer.java:950) ~[?:?]
      olxeu-atlas-web-dist-solr-1  |  at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:202) ~[metrics-core-4.1.5.jar:4.1.5]

      Steps:
      1. Run library/solr:9.0.0 in docker (default config, no tunings); mount a volume with solrconfig.xml that contains shardHandlerFactory and schema.xml;
      2. Create a core using the solrconfig.xml: http://localhost:8983/solr/admin/cores?action=CREATE&name=test&instanceDir=/var/solr/data/test&config=solrconfig.xml&dataDir=data/

      3. Failure with nullPointerException;
      4. Remove the shardHandlerFactory block;
      5. Repeat step 2;
      6. Success.
       
      Works fine when running Solr in SolrCloud mode.
      Works fine in Solr 8.11 and all older versions in both, standalone and SolrCloud.

      Attachments

        Issue Links

          Activity

            People

              houston Houston Putman
              vladiceanu Nick Vladiceanu
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m