Solr CDCR ||目标集合1的CdcrReplicator日志读取器未初始化,将被忽略

时间:2018-09-07 09:11:04

标签: solr solrcloud

我已经在两个不同的数据中心中设置了两个Solr云实例 目标Solr云计算机是在其上启用了basicAuth的源计算机的副本。 我无法在目标上看到任何复制。

Solr版本:6.6.3

我已经按照https://lucene.apache.org/solr/guide/6_6/cross-data-center-replication-cdcr.html

的建议完成了配置更改

源配置更改

<?xml version="1.0" encoding="UTF-8" ?>
<config>
...
<requestHandler name="/cdcr" class="solr.CdcrRequestHandler">
  <lst name="replica">
    <str name="zkHost">serverIP:2181,serverIP:2182,serverIP:2183</str>
    <str name="source">sitecore_master_index</str>
    <str name="target">sitecore_master_index</str>
  </lst>

  <lst name="replicator">
    <str name="threadPoolSize">8</str>
    <str name="schedule">1000</str>
    <str name="batchSize">128</str>
  </lst>

  <lst name="updateLogSynchronizer">
    <str name="schedule">1000</str>
  </lst>
</requestHandler>
  <updateHandler class="solr.DirectUpdateHandler2">

    <updateLog class="solr.CdcrUpdateLog">
      <str name="dir">${solr.ulog.dir:}</str>
      <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
    </updateLog>


    <autoCommit>
      <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
      <openSearcher>false</openSearcher>
    </autoCommit>

    <autoSoftCommit>
      <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
    </autoSoftCommit>
  </updateHandler>

  ...
  </config>

目标配置更改

<?xml version="1.0" encoding="UTF-8" ?>
<config>
...
<requestHandler name="/cdcr" class="solr.CdcrRequestHandler">
  <lst name="buffer">
    <str name="defaultState">disabled</str>
  </lst>
</requestHandler>
<updateRequestProcessorChain name="cdcr-proc-chain">
  <processor class="solr.CdcrUpdateProcessorFactory"/>
  <processor class="solr.RunUpdateProcessorFactory"/>
</updateRequestProcessorChain>
<requestHandler name="/update" class="solr.UpdateRequestHandler">
  <lst name="defaults">
    <str name="update.chain">cdcr-proc-chain</str>
  </lst>
</requestHandler>
 <updateHandler class="solr.DirectUpdateHandler2">

    <updateLog class="solr.CdcrUpdateLog">
      <str name="dir">${solr.ulog.dir:}</str>
      <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
    </updateLog>

    <autoCommit>
      <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
      <openSearcher>false</openSearcher>
    </autoCommit>

    <autoSoftCommit>
      <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
    </autoSoftCommit>

  </updateHandler>

  ...
  </config>

以下是来自源目标的日志。

2018-09-07 08:27:37.220 WARN  (cdcr-replicator-243-thread-5-processing-n:serverip:8983_solr) [   ] o.a.s.h.CdcrReplicator Log reader for target collection1 is not initialised, it will be ignored.
2018-09-07 08:27:38.858 WARN  (cdcr-replicator-241-thread-1-processing-n:serverip:8983_solr) [   ] o.a.s.h.CdcrReplicator Log reader for target collection2 is not initialised, it will be ignored.

我看不到目标。 如果有人可以帮助我,那就太好了。

1 个答案:

答案 0 :(得分:0)

很久以前就解决了。

尝试执行以下步骤。

  1. 重新启动Solr Server
  2. 停止所有索引的CDCR
  3. 重新启动所有索引的CDCR