I followed the article (https://medium.com/@hanyshehata/sitecore-setup-using-solr-master-slave-index-replication-6417cdd98eaa) to set up solr (8.1.1) master/slave on scaled environment. While I got the following error on slave server. Not exactly sure what is wrong with that. Much appreciated if anyone can help with that.
1 Answer
You must have missed something in your configuration in solr.config
file either on master
or on slave
server.
Here is a sample configuration for <requestHandler
section for master
server:
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="backupAfter">optimize</str>
<str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str>
<str name="commitReserveDuration">00:00:10</str>
</lst>
<int name="maxNumberOfBackups">2</int>
<lst name="invariants">
<str name="maxWriteMBPerSec">16</str>
</lst>
</requestHandler>
and here is sample configuration for slave
server:
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="slave">
<!-- fully qualified url for the replication handler of master. It is
possible to pass on this as a request param for the fetchindex command -->
<str name="masterUrl">https://master.solr:8983/solr/sitecore_core_index</str>
<!-- Interval in which the slave should poll master. Format is HH:mm:ss .
If this is absent slave does not poll automatically.
But a fetchindex can be triggered from the admin or the http API -->
<str name="pollInterval">00:00:20</str>
</lst>
</requestHandler>
<requestHandler name="/replication" class="solr.ReplicationHandler"> <lst name="slave"> <str name="masterUrl">https://ip address/solr/sitecore_core_index</str> <str name="pollInterval">00:00:20</str> <str name="compression">internal</str> <str name="httpConnTimeout">5000</str> <str name="httpReadTimeout">10000</str> </lst> </requestHandler>
Wondering if there is something i missed? Thanks !masterUrl
? Can you access that url from web browser on your slave server? Have you addedmaster
replication on Master server as well? can you add config from that part as well?