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 Walter Underwood <wu...@wunderwood.org> on 2013/01/23 23:12:16 UTC

Starting instances with multiple collections

I can get one Solr 4.1 instance up with the config bootstrapped into Zookeeper. In zk I see two configs, two collections, and I can run the DIH on the first node.

I can get the other two nodes to start and sync if I give them a -Dsolr.solr.home pointing to a directory with a solr.xml and subdirectories with configuration for each collection. If I don't do that, they look for solr/solr.xml, then fail. But what is the point of putting configs in Zookeeper if each host needs a copy anyway?

The wiki does not have an example of how to start a cluster with multiple collections.

Am I missing something here?

wunder
--
Walter Underwood
wunder@wunderwood.org




Re: Starting instances with multiple collections

Posted by Shawn Heisey <so...@elyograg.org>.
On 1/23/2013 3:12 PM, Walter Underwood wrote:
> I can get one Solr 4.1 instance up with the config bootstrapped into Zookeeper. In zk I see two configs, two collections, and I can run the DIH on the first node.
>
> I can get the other two nodes to start and sync if I give them a -Dsolr.solr.home pointing to a directory with a solr.xml and subdirectories with configuration for each collection. If I don't do that, they look for solr/solr.xml, then fail. But what is the point of putting configs in Zookeeper if each host needs a copy anyway?
>
> The wiki does not have an example of how to start a cluster with multiple collections.
>
> Am I missing something here?

I am a beginner at SolrCloud.  I did recently get 4.1 running, though.  
With help from Mark Miller, what I did was set up a basic solr.xml based 
on the example, but with zero cores.  I did add a sharedLib parameter 
because I use ICU components in schema.xml.  I started one server with 
the zkHost parameter, then started the other with the bootstrap options, 
calling that config 'mbbasecfg'.  That got my config into zookeeper.  I 
still didn't have any collections or cores at this point.

Then I did:

http://server:port/solr/admin/collections?action=CREATE&name=mbstuff&numShards=1&replicationFactor=2&collection.configName=mbbasecfg

That created the following cores, one per server:

mbstuff_shard1_replica1
mbstuff_shard1_replica2

I have since created other collections in the same way.  It works really 
well so far.  I still haven't gotten to failure testing, but that's coming.

There hasn't been time to put my findings on the wiki.  This is the 
first time I'm writing anything about it, and it's incomplete.

Thanks,
Shawn


Re: Starting instances with multiple collections

Posted by Mark Miller <ma...@gmail.com>.
On Jan 25, 2013, at 1:56 PM, Walter Underwood <wu...@wunderwood.org> wrote:

> I started out doing separate Zookeeper loads and linkconfigs, but backed off to bootstrapping after a total lack of success. I'll try that again (in my copious free time), because that seems like the right approach for production. 

Post any questions with your results if you could. Perhaps we can beef up the wiki a bit so others don't hit the same issues.

- Mark

Re: Starting instances with multiple collections

Posted by Walter Underwood <wu...@wunderwood.org>.
Oops, that is -DzkHost, not -Dzkhost.  --wunder

On Jan 25, 2013, at 10:56 AM, Walter Underwood wrote:

> Thanks, it is working when using just a solr.xml for each node. I can't find that anywhere in the docs.
> 
> As far as I can tell, the minimum config for a Zookeeper-based node is:
> 
> -Dzkhost=....
> -Dsolr.solr.home=...  (directory containing solr.xml file)
> 
> I started out doing separate Zookeeper loads and linkconfigs, but backed off to bootstrapping after a total lack of success. I'll try that again (in my copious free time), because that seems like the right approach for production. 
> 
> wunder
> 
> On Jan 24, 2013, at 8:27 AM, Per Steffensen wrote:
> 
>> Each node needs a -Dsolr.solr.home pointing to a solr.xml, but the configuration-subfolder does not need to be there. It only needs to be there for the node you start with -Dbootstrap_confdir (to have it load the config into ZK). The next time you start this Solr you do not need to provide -Dbootstrap_confdir, since config is already loaded into ZK (well unless you run your ZK embedded in the Solr - in this case I believe all ZK state is removed when you close the Solr, but that is also just for "playing")
>> In general, IMHO, using a Solr node to load a configuration during startup is only for "playing". You ought to load configs into ZK as a separate operation from starting Solrs (and creating collections for that matter). Also see recent mail-list dialog "Submit schema definition using curl via SOLR"
>> 
>> Regards, Per Steffensen
>> 
>> On 1/23/13 11:12 PM, Walter Underwood wrote:
>>> I can get one Solr 4.1 instance up with the config bootstrapped into Zookeeper. In zk I see two configs, two collections, and I can run the DIH on the first node.
>>> 
>>> I can get the other two nodes to start and sync if I give them a -Dsolr.solr.home pointing to a directory with a solr.xml and subdirectories with configuration for each collection. If I don't do that, they look for solr/solr.xml, then fail. But what is the point of putting configs in Zookeeper if each host needs a copy anyway?
>>> 
>>> The wiki does not have an example of how to start a cluster with multiple collections.
>>> 
>>> Am I missing something here?
>>> 
>>> wunder
>>> --
>>> Walter Underwood
>>> wunder@wunderwood.org
>>> 
>>> 
>>> 
>>> 
>> 
> 
> --
> Walter Underwood
> wunder@wunderwood.org
> 
> 
> 

--
Walter Underwood
wunder@wunderwood.org




Re: Starting instances with multiple collections

Posted by Walter Underwood <wu...@wunderwood.org>.
Thanks, it is working when using just a solr.xml for each node. I can't find that anywhere in the docs.

As far as I can tell, the minimum config for a Zookeeper-based node is:

-Dzkhost=....
-Dsolr.solr.home=...  (directory containing solr.xml file)

I started out doing separate Zookeeper loads and linkconfigs, but backed off to bootstrapping after a total lack of success. I'll try that again (in my copious free time), because that seems like the right approach for production. 

wunder

On Jan 24, 2013, at 8:27 AM, Per Steffensen wrote:

> Each node needs a -Dsolr.solr.home pointing to a solr.xml, but the configuration-subfolder does not need to be there. It only needs to be there for the node you start with -Dbootstrap_confdir (to have it load the config into ZK). The next time you start this Solr you do not need to provide -Dbootstrap_confdir, since config is already loaded into ZK (well unless you run your ZK embedded in the Solr - in this case I believe all ZK state is removed when you close the Solr, but that is also just for "playing")
> In general, IMHO, using a Solr node to load a configuration during startup is only for "playing". You ought to load configs into ZK as a separate operation from starting Solrs (and creating collections for that matter). Also see recent mail-list dialog "Submit schema definition using curl via SOLR"
> 
> Regards, Per Steffensen
> 
> On 1/23/13 11:12 PM, Walter Underwood wrote:
>> I can get one Solr 4.1 instance up with the config bootstrapped into Zookeeper. In zk I see two configs, two collections, and I can run the DIH on the first node.
>> 
>> I can get the other two nodes to start and sync if I give them a -Dsolr.solr.home pointing to a directory with a solr.xml and subdirectories with configuration for each collection. If I don't do that, they look for solr/solr.xml, then fail. But what is the point of putting configs in Zookeeper if each host needs a copy anyway?
>> 
>> The wiki does not have an example of how to start a cluster with multiple collections.
>> 
>> Am I missing something here?
>> 
>> wunder
>> --
>> Walter Underwood
>> wunder@wunderwood.org
>> 
>> 
>> 
>> 
> 

--
Walter Underwood
wunder@wunderwood.org




Re: Starting instances with multiple collections

Posted by Per Steffensen <st...@designware.dk>.
Each node needs a -Dsolr.solr.home pointing to a solr.xml, but the 
configuration-subfolder does not need to be there. It only needs to be 
there for the node you start with -Dbootstrap_confdir (to have it load 
the config into ZK). The next time you start this Solr you do not need 
to provide -Dbootstrap_confdir, since config is already loaded into ZK 
(well unless you run your ZK embedded in the Solr - in this case I 
believe all ZK state is removed when you close the Solr, but that is 
also just for "playing")
In general, IMHO, using a Solr node to load a configuration during 
startup is only for "playing". You ought to load configs into ZK as a 
separate operation from starting Solrs (and creating collections for 
that matter). Also see recent mail-list dialog "Submit schema definition 
using curl via SOLR"

Regards, Per Steffensen

On 1/23/13 11:12 PM, Walter Underwood wrote:
> I can get one Solr 4.1 instance up with the config bootstrapped into Zookeeper. In zk I see two configs, two collections, and I can run the DIH on the first node.
>
> I can get the other two nodes to start and sync if I give them a -Dsolr.solr.home pointing to a directory with a solr.xml and subdirectories with configuration for each collection. If I don't do that, they look for solr/solr.xml, then fail. But what is the point of putting configs in Zookeeper if each host needs a copy anyway?
>
> The wiki does not have an example of how to start a cluster with multiple collections.
>
> Am I missing something here?
>
> wunder
> --
> Walter Underwood
> wunder@wunderwood.org
>
>
>
>