You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mrityunjaya Pathak <mr...@outlook.com> on 2018/09/07 11:22:50 UTC
Solr CDCR replication not working
I have setup two solr cloud instances in two different Datacenters Target solr cloud machine is copy of source machine with basicAuth enabled on them. I am unable to see any replication on target.
Solr Version :6.6.3
I have done config changes as suggested on https://lucene.apache.org/solr/guide/6_6/cross-data-center-replication-cdcr.html
Source Config Changes
<?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>
Target Config Changes
<?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>
Below are logs from Source target.
ERROR (zkCallback-4-thread-2-processing-n:sourceIP:8983_solr) [ ] o.a.s.c.s.i.CloudSolrClient Request to collection collection1 failed due to (510) org.apache.solr.common.SolrException: Could not find a healthy node to handle the request., retry? 5
2018-09-07 10:36:14.295 WARN (zkCallback-4-thread-2-processing-n:sourceIP:8983_solr) [ ] o.a.s.h.CdcrReplicatorManager Unable to instantiate the log reader for target collection collection1
org.apache.solr.common.SolrException: Could not find a healthy node to handle the request.
at org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1377)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1134)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1237)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1237)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1237)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1237)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1237)
at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1073)
at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1219)
at org.apache.solr.handler.CdcrReplicatorManager.getCheckpoint(CdcrReplicatorManager.java:196)
at org.apache.solr.handler.CdcrReplicatorManager.initLogReaders(CdcrReplicatorManager.java:159)
at org.apache.solr.handler.CdcrReplicatorManager.stateUpdate(CdcrReplicatorManager.java:134)
at org.apache.solr.handler.CdcrStateManager.callback(CdcrStateManager.java:36)
at org.apache.solr.handler.CdcrLeaderStateManager.setAmILeader(CdcrLeaderStateManager.java:108)
at org.apache.solr.handler.CdcrLeaderStateManager.checkIfIAmLeader(CdcrLeaderStateManager.java:95)
at org.apache.solr.handler.CdcrLeaderStateManager.access$400(CdcrLeaderStateManager.java:40)
at org.apache.solr.handler.CdcrLeaderStateManager$LeaderStateWatcher.process(CdcrLeaderStateManager.java:150)
at org.apache.solr.common.cloud.SolrZkClient$3.lambda$process$0(SolrZkClient.java:269)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018-09-07 10:36:14.310 INFO (coreLoadExecutor-8-thread-3-processing-n:sourceIP:8983_solr) [ ] o.a.s.c.SolrConfig Using Lucene MatchVersion: 6.6.3
2018-09-07 10:36:14.315 INFO (zkCallback-4-thread-1-processing-n:sourceIP:8983_solr) [ ] o.a.s.c.c.ZkStateReader A cluster state change: [WatchedEvent state:SyncConnected type:NodeDataChanged path:/collections/collection1/state.json] for collection [sitecore] has occurred - updating... (live nodes size: [1])
2018-09-07 10:36:14.343 WARN (cdcr-replicator-211-thread-1-processing-n:sourceIP:8983_solr) [ ] o.a.s.h.CdcrReplicator Log reader for target collection1 is not initialised, it will be ignored.
I am unable to see anything on target. It will be great if someone can help me in it.
Can you help in this?
Regards
Mrityunjaya