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 SWP <st...@gmail.com> on 2014/07/17 20:56:44 UTC

Solr/Tomcat (embedded) Replication

Hello,

Trying to get replication working with embedded Solr (4.4.0) running in a
Tomcat6 container with the below master & slave configuration ->

Master (solrconfig.xml):

<requestHandler name="/replication" class="solr.ReplicationHandler" >
   <lst name="master">
    <str name="enable">true</str>
    <str name="replicateAfter">startup</str>
    <str name="replicateAfter">commit</str>
    </lst>
 </requestHandler>

Slave (solrconfig.xml):

<requestHandler name="/replication" class="solr.ReplicationHandler" >
  <lst name="slave">
    <str name="enable">${enable.slave:true}</str>
    <str name="masterUrl">http://$search_master:8181/$core_name</str>
    <str name="pollInterval">00:00:60</str>
  </lst>
</requestHandler>

We've tried various solr auto-commit & soft auto-commit configuration
combinations on the master in addition to application layer commits to force
replication but none of our changes have been successful.  Current
autoCommit config (solrconfig.xml):

<autoCommit>
  <maxDocs>${solr.autoCommit.maxDocs:1}</maxDocs>
  <maxTime>${solr.autoCommit.maxTime:1000}</maxTime>
  <openSearcher>true</openSearcher>
</autoCommit>

We've read that replication with embedded Solr is not possible without HTTP
but by using Tomcat as a Solr container, we're assuming this shouldn't be a
problem.  Is this assumption accurate?  Is there a problem with our
configuration?

Thanks.




Re: Solr/Tomcat (embedded) Replication

Posted by Shawn Heisey <so...@elyograg.org>.
On 7/17/2014 12:56 PM, SWP wrote:
> Trying to get replication working with embedded Solr (4.4.0) running in a
> Tomcat6 container with the below master & slave configuration ->

If you are using EmbeddedSolrServer, regardless of whether that code is
running in Tomcat or not, there is no HTTP access to the Solr server.

You must have Tomcat extract and run the solr war for normal access via
HTTP.  Or even better, use the Jetty that's included in the example
instead of Tomcat.

Thanks,
Shawn