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 Sam Batschelet <sb...@mac.com> on 2014/01/29 22:31:51 UTC

4.6 Core Discovery coreRootDirectory not working

Hello this is my 1st post to you group I am in the process of setting up a development environment using solr.  We will require multiple cores managed by multiple users in the following layout.  I am running a fairly vanilla version of 4.6

<solrHome>
/home/camp/example/solr/solr.xml

<cores>
/home/user1/solr/core.properties
/home/user2/solr/core.properties

If I manually add the core from admin everything works fine I can index etc but when I kill the server the core information is no longer available.  I need to delete the core.properties file and recreate core from admin.

I since have learned that this should be done with Core Discovery.  Mainly setting coreRootDirectory which logically in this case should be /home.  But solr is not finding the core even if I set the directory directly. ie /home/user1/solr/ or /home/user1/.  I must be missing another config and was hoping for some insight.


## solr.xml
<solr>
  <!-- <str name="coreRootDirectory">${coreRootDirectory:/home}</str> -->

  <solrcloud>
    <str name="host">${host:}</str>
    <int name="hostPort">${jetty.port:8883}</int>
    <str name="hostContext">${hostContext:solr}</str>
    <int name="zkClientTimeout">${zkClientTimeout:15000}</int>
    <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
  </solrcloud>

  <shardHandlerFactory name="shardHandlerFactory"
    class="HttpShardHandlerFactory">
    <int name="socketTimeout">${socketTimeout:0}</int>
    <int name="connTimeout">${connTimeout:0}</int>
  </shardHandlerFactory>

</solr>

Thanks
-Sam

 


Re: 4.6 Core Discovery coreRootDirectory not working

Posted by Erick Erickson <er...@gmail.com>.
I'm traveling and can't pursue this right now, but a couple of questions:

/home/user1/solr/core.properties exists in all these cases, right?

Tangential, but I'd be very cautious about setting core root the way you are,
since it'll walk each and every directory under /home looking for cores. Perhaps
you're just caught in that file-traversal loop (guessing here).

Do the log files show anything interesting?

I'll be able to respond occasionally between now and next week, since
we're on the road...

Best
Erick

On Wed, Jan 29, 2014 at 3:41 PM, Sam Batschelet <sb...@mac.com> wrote:
> On Jan 29, 2014, at 4:31 PM, Sam Batschelet wrote:
>
>> Hello this is my 1st post to you group I am in the process of setting up a development environment using solr.  We will require multiple cores managed by multiple users in the following layout.  I am running a fairly vanilla version of 4.6
>>
>> <solrHome>
>> /home/camp/example/solr/solr.xml
>>
>> <cores>
>> /home/user1/solr/core.properties
>> /home/user2/solr/core.properties
>>
>> If I manually add the core from admin everything works fine I can index etc but when I kill the server the core information is no longer available.  I need to delete the core.properties file and recreate core from admin.
>>
>> I since have learned that this should be done with Core Discovery.  Mainly setting coreRootDirectory which logically in this case should be /home.  But solr is not finding the core even if I set the directory directly. ie /home/user1/solr/ or /home/user1/.  I must be missing another config and was hoping for some insight.
>>
>>
>> ## solr.xml
>> <solr>
>>  <!-- <str name="coreRootDirectory">${coreRootDirectory:/home}</str> -->
>
> Just to point out the obvious before I get 20 responses to such I did test this without the commenting :).

Re: 4.6 Core Discovery coreRootDirectory not working

Posted by Sam Batschelet <sb...@mac.com>.
On Jan 29, 2014, at 4:31 PM, Sam Batschelet wrote:

> Hello this is my 1st post to you group I am in the process of setting up a development environment using solr.  We will require multiple cores managed by multiple users in the following layout.  I am running a fairly vanilla version of 4.6
> 
> <solrHome>
> /home/camp/example/solr/solr.xml
> 
> <cores>
> /home/user1/solr/core.properties
> /home/user2/solr/core.properties
> 
> If I manually add the core from admin everything works fine I can index etc but when I kill the server the core information is no longer available.  I need to delete the core.properties file and recreate core from admin.
> 
> I since have learned that this should be done with Core Discovery.  Mainly setting coreRootDirectory which logically in this case should be /home.  But solr is not finding the core even if I set the directory directly. ie /home/user1/solr/ or /home/user1/.  I must be missing another config and was hoping for some insight.
> 
> 
> ## solr.xml
> <solr>
>  <!-- <str name="coreRootDirectory">${coreRootDirectory:/home}</str> -->

Just to point out the obvious before I get 20 responses to such I did test this without the commenting :).