2013-07-17 58 views
0

我的開箱即用Solr 4.3.1無法識別從站設置中masterUrl末尾的尾隨/複製。使用Solr設置從站4.3.1

這裏是我的奴隸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>
</requestHandler>

而這裏的主服務器上的相關部分:
<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

廣泛的谷歌搜索沒有取得任何關於如何設置一個主URL,讓Solr的不修剪詞「複製」蓋棺定論。

有沒有什麼我在我的配置(S)缺少,使Solr去除masterUrl尾隨/replication?有沒有一種方法可以將主服務器配置爲具有不需要跟蹤/replication的複製URL?

感謝

回答

1

我意識到這是一個有點老了,但一些指針,如果你還在工作就可以了:

不要在/複製添加到您的masterURL標籤

獲得一個404 for mymaster:myport/solr/mycorename是正常的。

如果你只有一個核心,那麼你可以設置主URL只是mymaster:MyPort上/ Solr的/

這是一個相當不錯的參考,以及:https://cwiki.apache.org/confluence/display/solr/Index+Replication