Configuring shardsWhitelist in Solr 6.6

故事扮演 提交于 2021-02-19 04:23:18

问题


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


回答1:


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}




回答2:


You must specify the shardHandlerFactory element. The shardHandler element is incorrect.

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


来源:https://stackoverflow.com/questions/59036314/configuring-shardswhitelist-in-solr-6-6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!