2013-07-04 54 views
1

使用Solr的3.6.1,我得到在10.0.0.73上的从执行“fetchindex”命令时出现以下错误:的Solr 3.6.1复制主

重度:在大师:http://10.0.0.249:8983/solr/my_core/replication不可用。索引获取失败。例外:请求失败的URL [email protected]

在10.0.0.249上主的my_core核心拥有solrconfig.xml中的以下配置

<requestHandler name="/replication" class="solr.ReplicationHandler" >      
    <lst name="master">                 
     <str name="replicateAfter">commit</str>           
     <str name="replicateAfter">startup</str>           
     <str name="confFiles">schema.xml,stopwords.txt</str>        
    </lst>                    
</requestHandler> 

在在10.0.0.73 my_core从已在solrconfig.xml中配置的复制为

<requestHandler name="/replication" class="solr.ReplicationHandler">     
    <lst name="slave">                 
    <str name="masterUrl">http://10.0.0.249:8983/solr/my_core/replication</str>  
    <str name="pollInterval">00:00:60</str> 
    </lst>                    
</requestHandler> 

我想我做一些明显错误的,但阅读时间和重读Solr的文件后无法找到它复制和大量的帖子在这里和其他方面。任何人有想法?请注意发送给主设备的其他请求成功,例如

GET http://10.0.0.249:8983/solr/my_core/select 

回报

<?xml version="1.0" encoding="UTF-8"?>             
<response>                    
    <lst name="responseHeader"> 
    <int name="status">0</int> 
    <int name="QTime">0</int> 
    <lst name="params"/> 
    </lst> 
    <result name="response" numFound="0" start="0"/>       

+0

检查http://wiki.apache.org/solr/SolrReplication#enable.2Fdisable_master.2Fslave_in_a_node如果您需要定义enable属性来表明它是主站和从站 – Jayendra

回答

1

在从配置您的主网址被指定为,

<str name="masterUrl">http://10.0.0.249:8983/solr/my_core/replication</str> 

正确的URL会

<str name="masterUrl">http://10.0.0.249:8983/solr/my_core</str> 

您只需指定URL直到核心名称。