3

So when I add shards in RawQueryParameter of Solr Admin I get following error

**error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
      "msg":"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",
    "code":403}}**

I want to disable it but didn't found anything useful which is helpful Please let me know how I can disable it

I don't want to specify shards like

<str name="shardsWhitelist">${solr.shardsWhitelist:localhost:8080/solr/test,localhost:8080/solr/test2}</str>

just want to disable it

  • 2
    You need to give the argument `-Dsolr.disable.shardsWhitelist=true` when Solr is launched (it's given as an argument to the JVM). Exactly how you do that depends on how you're starting Solr. – MatsLindh May 19 '21 at 21:08

1 Answers1

4

You can add it as an argument while starting the solr as below.

-Dsolr.disable.shardsWhitelist=true

Also alternative option is you can add as solr.disable.shardsWhitelist=true to solr.in.sh file,

which is found at the path "...\solr-VERSION\bin"

Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47