1

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.

enter image description here

5
  • 1
    What is your replication handler part of config on Slave?
    – Marek Musielak
    Commented May 25, 2021 at 8:35
  • @MarekMusielak , Thanks for your comments and I added these code blocks in slave . <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 !
    – unamed
    Commented May 25, 2021 at 12:29
  • Have you included port number in masterUrl? Can you access that url from web browser on your slave server? Have you added master replication on Master server as well? can you add config from that part as well?
    – Marek Musielak
    Commented May 25, 2021 at 12:47
  • @MarekMusielak yes, port no. is included, while i indeed can not access the url with expected result. It returns 404 actually. Anyway, with another instance,it works fine in UAT server even i can not access that url which return the same 404 error. so i wonder if we have to get 200 status to finally set up the replication.
    – unamed
    Commented May 26, 2021 at 3:52
  • @MarekMusielak it works now and it's really weird as I did nothing except stop and start, and previously i just restart solr. That's the only difference as far i can find. Thanks for your support anyway.
    – unamed
    Commented May 26, 2021 at 4:39

1 Answer 1

0

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.