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 Joe Kessel <is...@hotmail.com> on 2009/12/01 00:45:59 UTC

RE: How to avoid hardcoding masterUrl in slave solrconfig.xml?

I do something very similar and it works for me.  I noticed on your URL that you have a mixed case fetchIndex, which the request handler is checking for fetchindex, all lowercase.  If it is not that simple I can try to see the exact url my code is generating.

 

Hope it helps,

Joe
 
> From: evalsinca@hotmail.com
> To: solr-user@lucene.apache.org
> Subject: Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?
> Date: Mon, 30 Nov 2009 13:48:38 -0800
> 
> Folks:
> 
> Sorry for this repost! It looks like this email went out twice....
> 
> Thanks,
> 
> - Bill
> 
> --------------------------------------------------
> From: "William Pierce" <ev...@hotmail.com>
> Sent: Monday, November 30, 2009 1:47 PM
> To: <so...@lucene.apache.org>
> Subject: How to avoid hardcoding masterUrl in slave solrconfig.xml?
> 
> > Folks:
> >
> > I do not want to hardcode the masterUrl in the solrconfig.xml of my slave. 
> > If the masterUrl tag is missing from the config file, I am getting an 
> > exception in solr saying that the masterUrl is required. So I set it to 
> > some dummy value, comment out the poll interval element, and issue a 
> > replication command manually like so:
> >
> > http://localhost:port/postings/replication?command=fetchIndex&masterUrl=http://localhost:port/postingsmaster/replication
> >
> > Now no internal exception, solr responds with a status "OK" for the above 
> > request, the tomcat logs show no error but the index is not replicated. 
> > When I issue the details command to the slave, I see that it ignored the 
> > masterUrl on the command line but instead complains that the master url in 
> > the config file (which I had set to a dummy value) is not correct.
> >
> > (Just fyi, I have tried sending in the masterUrl to the above command with 
> > url encoding and also without. in both cases, I got the same result.)
> >
> > Soooo....how exactly do I avoid hardcoding the masterUrl in the config 
> > file? Any pointers/help will be greatly appreciated!
> >
> > - Bill 
> 
 		 	   		  
_________________________________________________________________
Bing brings you maps, menus, and reviews organized in one place.
http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1

Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?

Posted by William Pierce <ev...@hotmail.com>.
Thanks, Noble....That did the trick!

- Bill

--------------------------------------------------
From: "Noble Paul നോബിള്‍  नोब्ळ्" <no...@corp.aol.com>
Sent: Monday, November 30, 2009 10:20 PM
To: <so...@lucene.apache.org>
Subject: Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?

> remove the <lst name="slave"> section from your solrconfig. It should be 
> fine
>
> On Tue, Dec 1, 2009 at 6:59 AM, William Pierce <ev...@hotmail.com> 
> wrote:
>> Hi, Joe:
>>
>> I tried with the "fetchIndex" all lower-cased, and still the same result.
>> What do you specify for masterUrl in the solrconfig.xml on the slave? 
>> it
>> seems to me that if I remove the element,  I get the exception I wrote
>> about.   If I set  it to some dummy url, then I get an invalid url 
>> message
>> when I run the command=details on the slave replication handler.
>>
>> What I am doing does not look out of the ordinary.   I want to control 
>> the
>> masterurl and the time of replication by myself.  As such I want neither 
>> the
>> masterUrl nor the polling interval in the config file.  Can you share
>> relevant snippets of your config file and the exact url your code is
>> generating?
>>
>> Thanks,
>>
>> - Bill
>>
>> --------------------------------------------------
>> From: "Joe Kessel" <is...@hotmail.com>
>> Sent: Monday, November 30, 2009 3:45 PM
>> To: <so...@lucene.apache.org>
>> Subject: RE: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>>
>>>
>>> I do something very similar and it works for me.  I noticed on your URL
>>> that you have a mixed case fetchIndex, which the request handler is 
>>> checking
>>> for fetchindex, all lowercase.  If it is not that simple I can try to 
>>> see
>>> the exact url my code is generating.
>>>
>>>
>>>
>>> Hope it helps,
>>>
>>> Joe
>>>
>>>> From: evalsinca@hotmail.com
>>>> To: solr-user@lucene.apache.org
>>>> Subject: Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>>>> Date: Mon, 30 Nov 2009 13:48:38 -0800
>>>>
>>>> Folks:
>>>>
>>>> Sorry for this repost! It looks like this email went out twice....
>>>>
>>>> Thanks,
>>>>
>>>> - Bill
>>>>
>>>> --------------------------------------------------
>>>> From: "William Pierce" <ev...@hotmail.com>
>>>> Sent: Monday, November 30, 2009 1:47 PM
>>>> To: <so...@lucene.apache.org>
>>>> Subject: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>>>>
>>>> > Folks:
>>>> >
>>>> > I do not want to hardcode the masterUrl in the solrconfig.xml of my >
>>>> > slave.
>>>> > If the masterUrl tag is missing from the config file, I am getting an
>>>> > exception in solr saying that the masterUrl is required. So I set it 
>>>> > to
>>>> > some dummy value, comment out the poll interval element, and issue a
>>>> > replication command manually like so:
>>>> >
>>>> >
>>>> > http://localhost:port/postings/replication?command=fetchIndex&masterUrl=http://localhost:port/postingsmaster/replication
>>>> >
>>>> > Now no internal exception, solr responds with a status "OK" for the >
>>>> > above
>>>> > request, the tomcat logs show no error but the index is not 
>>>> > replicated.
>>>> > When I issue the details command to the slave, I see that it ignored 
>>>> >  >
>>>> > the
>>>> > masterUrl on the command line but instead complains that the master 
>>>> > url
>>>> > > in
>>>> > the config file (which I had set to a dummy value) is not correct.
>>>> >
>>>> > (Just fyi, I have tried sending in the masterUrl to the above command 
>>>> >  >
>>>> > with
>>>> > url encoding and also without. in both cases, I got the same result.)
>>>> >
>>>> > Soooo....how exactly do I avoid hardcoding the masterUrl in the 
>>>> > config
>>>> > file? Any pointers/help will be greatly appreciated!
>>>> >
>>>> > - Bill
>>>>
>>>
>>> _________________________________________________________________
>>> Bing brings you maps, menus, and reviews organized in one place.
>>>
>>> http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
>>
>>
>
>
>
> -- 
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 

Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
remove the <lst name="slave"> section from your solrconfig. It should be fine

On Tue, Dec 1, 2009 at 6:59 AM, William Pierce <ev...@hotmail.com> wrote:
> Hi, Joe:
>
> I tried with the "fetchIndex" all lower-cased, and still the same result.
> What do you specify for masterUrl in the solrconfig.xml on the slave?   it
> seems to me that if I remove the element,  I get the exception I wrote
> about.   If I set  it to some dummy url, then I get an invalid url message
> when I run the command=details on the slave replication handler.
>
> What I am doing does not look out of the ordinary.   I want to control the
> masterurl and the time of replication by myself.  As such I want neither the
> masterUrl nor the polling interval in the config file.  Can you share
> relevant snippets of your config file and the exact url your code is
> generating?
>
> Thanks,
>
> - Bill
>
> --------------------------------------------------
> From: "Joe Kessel" <is...@hotmail.com>
> Sent: Monday, November 30, 2009 3:45 PM
> To: <so...@lucene.apache.org>
> Subject: RE: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>
>>
>> I do something very similar and it works for me.  I noticed on your URL
>> that you have a mixed case fetchIndex, which the request handler is checking
>> for fetchindex, all lowercase.  If it is not that simple I can try to see
>> the exact url my code is generating.
>>
>>
>>
>> Hope it helps,
>>
>> Joe
>>
>>> From: evalsinca@hotmail.com
>>> To: solr-user@lucene.apache.org
>>> Subject: Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>>> Date: Mon, 30 Nov 2009 13:48:38 -0800
>>>
>>> Folks:
>>>
>>> Sorry for this repost! It looks like this email went out twice....
>>>
>>> Thanks,
>>>
>>> - Bill
>>>
>>> --------------------------------------------------
>>> From: "William Pierce" <ev...@hotmail.com>
>>> Sent: Monday, November 30, 2009 1:47 PM
>>> To: <so...@lucene.apache.org>
>>> Subject: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>>>
>>> > Folks:
>>> >
>>> > I do not want to hardcode the masterUrl in the solrconfig.xml of my >
>>> > slave.
>>> > If the masterUrl tag is missing from the config file, I am getting an
>>> > exception in solr saying that the masterUrl is required. So I set it to
>>> > some dummy value, comment out the poll interval element, and issue a
>>> > replication command manually like so:
>>> >
>>> >
>>> > http://localhost:port/postings/replication?command=fetchIndex&masterUrl=http://localhost:port/postingsmaster/replication
>>> >
>>> > Now no internal exception, solr responds with a status "OK" for the >
>>> > above
>>> > request, the tomcat logs show no error but the index is not replicated.
>>> > When I issue the details command to the slave, I see that it ignored >
>>> > the
>>> > masterUrl on the command line but instead complains that the master url
>>> > > in
>>> > the config file (which I had set to a dummy value) is not correct.
>>> >
>>> > (Just fyi, I have tried sending in the masterUrl to the above command >
>>> > with
>>> > url encoding and also without. in both cases, I got the same result.)
>>> >
>>> > Soooo....how exactly do I avoid hardcoding the masterUrl in the config
>>> > file? Any pointers/help will be greatly appreciated!
>>> >
>>> > - Bill
>>>
>>
>> _________________________________________________________________
>> Bing brings you maps, menus, and reviews organized in one place.
>>
>> http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
>
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?

Posted by William Pierce <ev...@hotmail.com>.
Hi, Joe:

I tried with the "fetchIndex" all lower-cased, and still the same result. 
What do you specify for masterUrl in the solrconfig.xml on the slave?   it 
seems to me that if I remove the element,  I get the exception I wrote 
about.   If I set  it to some dummy url, then I get an invalid url message 
when I run the command=details on the slave replication handler.

What I am doing does not look out of the ordinary.   I want to control the 
masterurl and the time of replication by myself.  As such I want neither the 
masterUrl nor the polling interval in the config file.  Can you share 
relevant snippets of your config file and the exact url your code is 
generating?

Thanks,

- Bill

--------------------------------------------------
From: "Joe Kessel" <is...@hotmail.com>
Sent: Monday, November 30, 2009 3:45 PM
To: <so...@lucene.apache.org>
Subject: RE: How to avoid hardcoding masterUrl in slave solrconfig.xml?

>
> I do something very similar and it works for me.  I noticed on your URL 
> that you have a mixed case fetchIndex, which the request handler is 
> checking for fetchindex, all lowercase.  If it is not that simple I can 
> try to see the exact url my code is generating.
>
>
>
> Hope it helps,
>
> Joe
>
>> From: evalsinca@hotmail.com
>> To: solr-user@lucene.apache.org
>> Subject: Re: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>> Date: Mon, 30 Nov 2009 13:48:38 -0800
>>
>> Folks:
>>
>> Sorry for this repost! It looks like this email went out twice....
>>
>> Thanks,
>>
>> - Bill
>>
>> --------------------------------------------------
>> From: "William Pierce" <ev...@hotmail.com>
>> Sent: Monday, November 30, 2009 1:47 PM
>> To: <so...@lucene.apache.org>
>> Subject: How to avoid hardcoding masterUrl in slave solrconfig.xml?
>>
>> > Folks:
>> >
>> > I do not want to hardcode the masterUrl in the solrconfig.xml of my 
>> > slave.
>> > If the masterUrl tag is missing from the config file, I am getting an
>> > exception in solr saying that the masterUrl is required. So I set it to
>> > some dummy value, comment out the poll interval element, and issue a
>> > replication command manually like so:
>> >
>> > http://localhost:port/postings/replication?command=fetchIndex&masterUrl=http://localhost:port/postingsmaster/replication
>> >
>> > Now no internal exception, solr responds with a status "OK" for the 
>> > above
>> > request, the tomcat logs show no error but the index is not replicated.
>> > When I issue the details command to the slave, I see that it ignored 
>> > the
>> > masterUrl on the command line but instead complains that the master url 
>> > in
>> > the config file (which I had set to a dummy value) is not correct.
>> >
>> > (Just fyi, I have tried sending in the masterUrl to the above command 
>> > with
>> > url encoding and also without. in both cases, I got the same result.)
>> >
>> > Soooo....how exactly do I avoid hardcoding the masterUrl in the config
>> > file? Any pointers/help will be greatly appreciated!
>> >
>> > - Bill
>>
>
> _________________________________________________________________
> Bing brings you maps, menus, and reviews organized in one place.
> http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1