Thank you Shawn. Neither using ip address nor maxShardsPerNode=1 has any effect. Let me try few other things today and I'll get back to you.
-Shankar On Thu, Feb 21, 2013 at 9:05 PM, Shawn Heisey <s...@elyograg.org> wrote: > On 2/21/2013 9:50 PM, Shankar Sundararaju wrote: > >> I am using Solr 4.1. >> >> I created collection1 consisting of 2 leaders and 2 replicas (2 shards) at >> boot time. >> >> After the cluster is up, I am trying to create collection2 with 2 leaders >> and 2 replicas just like collection1. I am using following collections API >> for that: >> >> http://localhost:7575/solr/**admin/collections?action=** >> CREATE&name=collection2&**numShards=2&replicationFactor=** >> 2&collection.configName=**myconf&createNodeSet=** >> localhost:8983_solr,localhost:**7574_solr,localhost:7575_solr,** >> localhost:7576_solr<http://localhost:7575/solr/admin/collections?action=CREATE&name=collection2&numShards=2&replicationFactor=2&collection.configName=myconf&createNodeSet=localhost:8983_solr,localhost:7574_solr,localhost:7575_solr,localhost:7576_solr> >> >> Yes, collection2 does get created. But I see a problem - createNodeSet >> parameter is not being honored. All 4 nodes are not being used to create >> collection2, only 3 are being used. Is this a bug or I don't understand >> how >> this parameter should be used? >> >> What is the best way to create collection2? Can I specify both collections >> in solr.xml in the solr home dir in all nodes and launch them? Do I have >> to >> get the configs for collection2 uploaded to zookeeper before I launch the >> nodes? >> > > Is your cluster comprised of only those four Solr nodes, or do you have > others? If it's just those four, you should not need to tell it which ones > to use, it should use all of them. You could try adding maxShardsPerNode=1 > just to be sure that it won't try to put more than one shard on any one > node. > > I did find an email thread saying that hostnames won't work in > createNodeSet with Solr 4.1, because 4.1 defaults to IP addresses when each > node registers with Zookeeper. Check your SolrCloud graph in the admin UI. > If you see IP addresses there, you will probably have to use IP addresses > in the createNodeSet parameter. You can force hostnames by including > host="myhostname" in the cores parameter of solr.xml and restarting Solr on > that node. > > I'm relatively new to SolrCloud, but I'm learning. > > Thanks, > Shawn > > -- Regards, *Shankar Sundararaju *Sr. Software Architect ebrary, a ProQuest company 410 Cambridge Avenue, Palo Alto, CA 94306 USA shan...@ebrary.com | www.ebrary.com | 650-475-8776 (w) | 408-426-3057 (c)