【问题标题】:Setting up a slave with Solr 4.3.1使用 Solr 4.3.1 设置从站
【发布时间】:2013-07-16 16:37:04
【问题描述】:

我的开箱即用 Solr 4.3.1 无法识别从属设置中 masterUrl 末尾的尾随 /replication。

这是我在slave上的solrconfig.xml的相关部分:
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="slave">
<str name="masterUrl">http://mymaster:myport/solr/mycorename/replication</str>
<str name="pollInterval">00:00:60</str>
</lst>
@ 987654327@

这里是master的相关部分:
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
<str name="replicateAfter">optimization</str>
<str name="confFiles">schema.xml,stopwords.txt</str>
</lst>
</requestHandler>

这是我每分钟在从站上遇到的错误(如pollInterval 指定的):
Master at: http://mymaster:myport/solr/collection1 is not available. Index fetch failed. Exception: Host name may not be null

http://wiki.apache.org/solr/SolrReplication 说用浏览器点击 masterUrl 以确保它是正确的;响应状态 OK 是必须的。当我用浏览器点击 mymaster:myport/solr/mycorename/replication 时,我得到了响应状态 OK。当我点击 mymaster:myport/solr/mycorename 时,我得到一个 404。

广泛的 Google 搜索没有得出任何关于如何设置主 URL 和让 Solr 不修剪“复制”一词的明确信息。

我的配置中是否缺少某些东西使 Solr 从 masterUrl 中去除尾随 /replication?有没有办法可以将主服务器配置为具有不需要尾随 /replication 的复制 URL?

谢谢

【问题讨论】:

    标签: solr replication master solr4 slave


    【解决方案1】:

    我知道这有点老了,但如果你还在研究它,请给一些建议:

    不要将 /replication 添加到您的 masterURL 标记中

    为 mymaster:myport/solr/mycorename 获取 404 是正常的。

    如果您只有一个核心,您可以将主 URL 设置为 mymaster:myport/solr/

    这也是一个很好的参考:https://cwiki.apache.org/confluence/display/solr/Index+Replication

    【讨论】:

      猜你喜欢
      • 2013-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-06
      • 1970-01-01
      • 2014-11-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多