Search code examples
solrsharding

Configuring shardsWhitelist in Solr 6.6


Need help to configure shardsWhitelist in Solr 6.6. I have the below line in Solr.xml

<str name="shardsWhitelist">${solr.shardsWhitelist:}</str>

And I added the following in solrconfig.xml

  <requestHandler name="/select" class="solr.SearchHandler">
     <shardHandler class="HttpShardHandlerFactory">
        <int name="socketTimeOut">1000</int>
        <int name="connTimeOut">5000</int>
        <str name="shardsWhitelist">https://<URL1>/solr/core0,<URL2>/solr/core0,<URL3>/solr/core0</str>
     </shardHandler>

But, I can’t get the solr to acknowledge the configuration:

HttpShardHandlerFactory shardsWhitelist not configured but required (in lieu of ZkController and ClusterState) when using the 'shards' parameter. set -Dsolr.disable.shardsWhitelist=true to disable shards whitelist checks


Solution

  • Make sure to NOT use https/http.

    ${solr.shardsWhitelist::PORT/solr/CORENAME,:PORT/solr/CORENAME}

    Example: ${solr.shardsWhitelist:something.com:8985/solr/core_0,something.com:8985/solr/core2}