Found out my issue. solrconfig.xml on the MASTER servers did not have this
statement.
<str name="replicateAfter">startup</str>
My solrconfig.xml should have looked like this.
<!--Master config-->
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">optimize</str>
<str name="replicateAfter">startup</str>
<str
name="confFiles">solrconfig_slave.xml:solrconfig.xml,schema.xml,stopwords.txt</str>
</lst>
</requestHandler>
After adding this statement, replication worked.
________________________________________
From: Jeremy Carroll [[email protected]]
Sent: Tuesday, February 02, 2010 1:15 PM
To: [email protected]
Subject: RE: fetchindex not working.
Here are the debugging statements. Replication is not happening from the slave
to the master. I see that the slave is issuing an indexversion request, but
does nothing with it.
### SLAVE CATALINA.OUT ###
INFO: [core1] webapp=/solr path=/replication
params={command=fetchindex&masterUrl=http://10.10.0.61:8080/solr/core1/replication}
status=0 QTime=0
Feb 2, 2010 1:14:04 PM org.apache.solr.handler.SnapPuller <init>
INFO: No value set for 'pollInterval'. Timer Task not started.
Feb 2, 2010 1:14:04 PM
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
getConnectionWithTimeout
FINE: HttpConnectionManager.getConnection: config =
HostConfiguration[host=http://10.10.0.61:8080], timeout = 0
Feb 2, 2010 1:14:04 PM
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool
getFreeConnection
FINE: Getting free connection,
hostConfig=HostConfiguration[host=http://10.10.0.61:8080]
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpConnection closeIfStale
FINE: Connection is stale, closing...
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpConnection open
FINE: Open connection to 10.10.0.61:8080
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "POST /solr/core1/replication HTTP/1.1[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpMethodBase
addHostRequestHeader
FINE: Adding Host request header
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpMethodBase
getContentCharSet
FINE: Default charset used: ISO-8859-1
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpMethodBase
getContentCharSet
FINE: Default charset used: ISO-8859-1
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "Host: 10.10.0.61:8080[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "Content-Length: 31[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: >> "command=indexversion&wt=javabin"
Feb 2, 2010 1:14:04 PM
org.apache.commons.httpclient.methods.EntityEnclosingMethod writeRequestBody
FINE: Request body sent
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "HTTP/1.1 200 OK[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "HTTP/1.1 200 OK[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "Content-Type: application/octet-stream[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "Content-Length: 72[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "Date: Tue, 02 Feb 2010 19:14:04 GMT[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "Server: Apache[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: << "[\r][\n]"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.Wire wire
FINE: <<
"[0x1][0xa3][0xe0].responseHeader[0xa2][0xe0]&status[0x6][0x0][0x0][0x0][0x0][0xe0]%QTime[0x6][0x0][0x0][0x0][0x0][0xe0],indexversion`[0xe0]*generation`"
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpMethodBase
shouldCloseConnection
FINE: Resorting to protocol version default close connection policy
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpMethodBase
shouldCloseConnection
FINE: Should NOT close connection, using HTTP/1.1
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.HttpConnection
releaseConnection
FINE: Releasing connection back to connection manager.
Feb 2, 2010 1:14:04 PM
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool
freeConnection
FINE: Freeing connection,
hostConfig=HostConfiguration[host=http://10.10.0.61:8080]
Feb 2, 2010 1:14:04 PM org.apache.commons.httpclient.util.IdleConnectionHandler
add
FINE: Adding connection at: 1265138044622
Feb 2, 2010 1:14:04 PM
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool
notifyWaitingThread
FINE: Notifying no-one, there are no waiting threads
### MASTER CATALINA.OUT ###
Feb 2, 2010 1:16:00 PM org.apache.solr.core.SolrCore execute
INFO: [core1] webapp=/solr path=/replication
params={wt=javabin&command=indexversion} status=0 QTime=0
Feb 2, 2010 1:16:01 PM org.apache.solr.core.Config getVal
FINE: solrconfig.xml admin/healthcheck/text()=/var/lib/solr/server-enabled
________________________________________
From: Jeremy Carroll [[email protected]]
Sent: Tuesday, February 02, 2010 11:47 AM
To: [email protected]
Subject: RE: fetchindex not working.
I do not see a stack trace, but the replication does not happen. I do not see a
request in the logs of the master server that it even tried to pull the index.
________________________________________
From: Shalin Shekhar Mangar [[email protected]]
Sent: Tuesday, February 02, 2010 11:36 AM
To: [email protected]
Subject: Re: fetchindex not working.
On Tue, Feb 2, 2010 at 10:26 PM, Jeremy Carroll <
[email protected]> wrote:
> I'm trying to get solr to fetch an index from a master server. This does
> not work with our configuration, and throws an error that pollInterval
> cannot be null. I thought to get fetchindex working, that pollInterval
> should not be in the solrconfig.xml file? I have tried adding pollInterval
> to the configuraiton, but it still will not work. Does anybody have any
> experience with this issue?
>
> # REQUEST #
>
> http://solr:8080/solr/core1/replication?command=fetchindex&masterUrl=http://10.10.0.61:8080/solr/core1/replication&command=fetchindex
>
> # SOLRCONFIG.XML #
> <!-- Slave config -->
> <requestHandler name="/replication" class="solr.ReplicationHandler">
> <lst name="slave">
> <str name="masterUrl">
> http://127.0.0.1:8080/solr/${solr.core.name}/replication</str>
> </lst>
> </requestHandler>
>
> # CATALINA.OUT #
> INFO: [blogs_2009_53_1] webapp=/solr path=/replication params={masterUrl=
> http://10.10.0.61:8080/solr/core1/replication&command=fetchindex} status=0
> QTime=0
> Feb 2, 2010 10:47:51 AM org.apache.solr.handler.SnapPuller <init>
> INFO: No value set for 'pollInterval'. Timer Task not started.
> Feb 2, 2010 10:47:51 AM org.apache.solr.core.SolrCore execute
>
>
That is just an INFO level log message. Have you seen an exception saying
that pollInterval cannot be null? If yes, can you please paste the stack
trace.
--
Regards,
Shalin Shekhar Mangar.