On 10/31/2013 9:18 PM, kaustubh147 wrote:
> Glassfish 3.1.2.2 
> Solr 4.5 
> Zookeeper 3.4.5 
> 
> We have set up a SolrCloud with 4 Solr nodes and 3 zookeeper instances. 
> 
> I start the cluster for the first time with bootstrap_conf= true.... All the
> nodes starts property.. I am creating cores (with the same name) on all 4
> instances. I can add multiple cores on each of the instances... logically I
> have 5 collections.
> 
> Now i am creating indexes.. and it automatically creates 4 copies of the
> index, one for each instance in appropriate SolrHome directory... It will
> work properly untill I restart the Solr cluster
> 
> as soon as I restart the cluster, it throws this error (refer below) and
> none of the collection works properly...

It's having problems with the index locking.  Further down, you talk
about shared directories.  I assume you're using a network filesystem,
like NFS.  Lucene and Solr don't work well with network file systems,
and NFS in particular.

http://stackoverflow.com/questions/9599529/solr-over-nfs-problems

For SolrCloud, using the bootstrap options tends to create a lot of
confusion.

> 1. I have removed dataDir from solrconfig.xml as suggested by Shaun here...
> 
> http://lucene.472066.n3.nabble.com/Solr-4-3-0-Shard-instances-using-incorrect-data-directory-on-machine-boot-td4063799.html
> 
> 2. I have provided absolute dataDir path in the core.properties file -
> https://issues.apache.org/jira/browse/SOLR-4878
> 
> 3. InstanceDir in each SolrHome have same name for every core/collection--
> for example
> 
> SolrHome1/solr/xyz/conf
> SolrHome1/solr/xyz/data
> SolrHome1/solr/xyz/core.properties
> SolrHome1/solr/pqr/conf
> SolrHome1/solr/pqr/data
> SolrHome1/solr/pqr/core.properties
> 
> 
> SolrHome2/solr/xyz/conf
> SolrHome2/solr/xyz/data
> SolrHome2/solr/xyz/core.properties
> SolrHome2/solr/pqr/conf
> SolrHome2/solr/pqr/data
> SolrHome2/solr/pqr/core.properties
> 
> ...
> 
> 3. The 4 SolrHome for each of the instances are on a single shared drive...
> but are in different directories
> 
> 4. All my collections and cores share the same solrconfig.xml 

The fact that you're using SolrCloud changes things quite a bit.  I
notice that you have a "conf" directory on all your cores.  I'm very
curious as to why -- because with SolrCloud, the config that's used
isn't on the disk, it's in zookeeper ... and when you create a
collection from scratch, the cores will NOT contain a conf directory.

IMHO, you shouldn't be trying to control things like dataDir with
SolrCloud.  In fact, you should let SolrCloud control practically all
aspects of your cores.  Here's some more stuff that's my opinion about
how a SolrCloud should be begun and managed:

Set the solr home, either with a solr.solr.home java system property or
the JNDI property solr/home.  In solr.xml, include settings for the
hostPort and hostContext, and include a zkHost parameter as well with
the following format, where "mysolr" is a zookeeper chroot and can be
anything you want it to be:

zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com/mysolr

Upload one or more configs to zookeeper using the zkcli "upconfig" command.

The first time you start each Solr server, it should have no cores at
all, and you should never use any bootstrap options.

Once all servers are started, create a collection using the following
URL as a template:

http://server:port/admin/collections?action=CREATE&name=mytest&numShards=X&replicationFactor=N&collection.configName=mycfg

Use appropriate values for name, X and N, and N should be at least 2
unless you're building a dev cluster that doesn't need redundancy.  For
the collection.configName, use a config name that you uploaded earlier
with zkcli.

Thanks,
Shawn

Reply via email to