Right Mark, I am accessing the Collections API using Solrj. This is where I am stuck. If I just use the Collections API using http thru the browser, the behavior is as expected. Is there an example of using the Collections API using SolrJ? My code looks like
String[] urls = {"http://127.0.0.1:8983/solr/","http://127.0.0.1:8900/solr/","http://127.0.0 .1:7500/solr/","http://127.0.0.1:7574/solr/"}; CloudSolrServer server = new CloudSolrServer("127.0.0.1:2181", new LBHttpSolrServer(urls)); server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection PNames.CONNECTION_TIMEOUT, 5000); server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection PNames.SO_TIMEOUT, 20000); server.setDefaultCollection(collectionName); server.connect(); CoreAdminRequest.Create create = new CoreAdminRequest.Create(); create.setCoreName("myColl"); create.setCollection("myColl"); create.setInstanceDir("defaultDir"); create.setDataDir("myCollData"); create.setNumShards(2); create.process(server); //Exception No live SolrServers is thrown here Regards Jay -----Original Message----- From: Mark Miller [mailto:markrmil...@gmail.com] Sent: Monday, January 07, 2013 11:57 AM To: solr-user@lucene.apache.org Subject: Re: "No live SolrServers" Solr 4 exceptions on trying to create a collection On Jan 7, 2013, at 12:33 PM, Jay Parashar <jparas...@itscape.com> wrote: > With my setup (4 servers running at localhost 8983, 8900, 7574 and 7500) when I manually do a > http://127.0.0.1:7500/solr/admin/cores?action=CREATE&name=myColl1&instanceDi r=default&dataDir=myColl1Data&collection=myColl1&numShards=2 > it creates the collection only at the 7500 server. This is similar to when I use HttpSolrServer (Solr 3.6 behavior). This only starts one core. If you want to use the CoreAdmin API you would need to make four calls, one to each server. If you want this done for you, you must use the Collections API - see the wiki: http://wiki.apache.org/solr/SolrCloud#Managing_collections_via_the_Collectio ns_API - Mark