Replicate Now Not Working

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Replicate Now Not Working

sidharth228
Hi,

The "replicateNow" button in the admin UI doesn't seem to work since the
"schema.xml" (which I modified on slave) is not being updated to reflect
that of the master. I have used this button before and it has always cloned
index right away. Any ideas on what could be the possible reason for this?

The master and slave have proper "/replication" handlers and "schema.xml"
is in the confFiles.

Master's Solrconfig:
-----------------------
<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,synonyms.txt</str> </lst> </requestHandler>

Slave's Solrconfig:
---------------------
<requestHandler name="/replication" class="solr.ReplicationHandler" > <lst
name="slave"> <str name="masterUrl">MASTER_URL</str> <str name=
"pollInterval">01:00:00</str> </lst> </requestHandler>

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Replicate Now Not Working

Erick Erickson
Are you sure that you’re _using_ schema.xml and not managed-schema? the default has changed. If no explicit entry is made in solrconfig.xml to define <schemaFactory….>, you’ll be using managed-schema, not schema.xml.

Best,
Erick

> On Jul 23, 2019, at 5:51 AM, Sidharth Negi <[hidden email]> wrote:
>
> Hi,
>
> The "replicateNow" button in the admin UI doesn't seem to work since the
> "schema.xml" (which I modified on slave) is not being updated to reflect
> that of the master. I have used this button before and it has always cloned
> index right away. Any ideas on what could be the possible reason for this?
>
> The master and slave have proper "/replication" handlers and "schema.xml"
> is in the confFiles.
>
> Master's Solrconfig:
> -----------------------
> <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,synonyms.txt</str> </lst> </requestHandler>
>
> Slave's Solrconfig:
> ---------------------
> <requestHandler name="/replication" class="solr.ReplicationHandler" > <lst
> name="slave"> <str name="masterUrl">MASTER_URL</str> <str name=
> "pollInterval">01:00:00</str> </lst> </requestHandler>
>
> Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Replicate Now Not Working

sidharth228
Ah nevermind, I managed to resolve the issue.

It seems that replication only works if the index changes. I noticed that
both master and slave had same index versions since I had only changed the
schema.

When I modified a random field of a random document, the index versions of
master and slave became different, and replication worked as usual.

Is this common knowledge that I missed somehow?

Thanks!



On Tue, Jul 23, 2019, 7:10 PM Erick Erickson <[hidden email]>
wrote:

> Are you sure that you’re _using_ schema.xml and not managed-schema? the
> default has changed. If no explicit entry is made in solrconfig.xml to
> define <schemaFactory….>, you’ll be using managed-schema, not schema.xml.
>
> Best,
> Erick
>
> > On Jul 23, 2019, at 5:51 AM, Sidharth Negi <[hidden email]>
> wrote:
> >
> > Hi,
> >
> > The "replicateNow" button in the admin UI doesn't seem to work since the
> > "schema.xml" (which I modified on slave) is not being updated to reflect
> > that of the master. I have used this button before and it has always
> cloned
> > index right away. Any ideas on what could be the possible reason for
> this?
> >
> > The master and slave have proper "/replication" handlers and "schema.xml"
> > is in the confFiles.
> >
> > Master's Solrconfig:
> > -----------------------
> > <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,synonyms.txt</str> </lst> </requestHandler>
> >
> > Slave's Solrconfig:
> > ---------------------
> > <requestHandler name="/replication" class="solr.ReplicationHandler" >
> <lst
> > name="slave"> <str name="masterUrl">MASTER_URL</str> <str name=
> > "pollInterval">01:00:00</str> </lst> </requestHandler>
> >
> > Thanks!
>
>