How to disable shardsWhitelist, I am getting Following error

2.3k views Asked by At

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

1

There are 1 answers

0
Abhijit Bashetti On BEST ANSWER

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"