On 4/14/2016 8:32 AM, Rohana Rajapakse wrote: > I have added few dependency jars into my project. There are no compilation > errors or ClassNotFound exceptions, but Zookeeper exception " > KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for > /solr/solr.xml ". My temporary solrHome folder has a solr.xml. No other > files (solrconfig.xml , schema.xml) are provided. Thought it should start > solr cloud server with defaults, but it doesn't. There are no other solr or > zookeeper servers running on my machine.
I looked at SolrCloudTestCase to see how MiniSolrCloudCluster should be used, then I wrote a little program and configured ivy to pull down solr-test-framework from 6.0.0 (getting ivy to work right was an adventure!). Based on what I found in SolrCloudTestCase, this is the code I wrote last evening: public class MiniSC { static JettyConfig jettyConfig = null; static MiniSolrCloudCluster msc = null; static CloudSolrClient client = null; public static void main(String[] args) throws Exception { jettyConfig = JettyConfig.builder().setContext("/solr").build(); msc = new MiniSolrCloudCluster(2, Paths.get("testcluster"), jettyConfig); client = msc.getSolrClient(); client.close(); msc.shutdown(); } } At first, I saw the same exception you got ... but after a little while I figured out that this is because I was running the program more than once without deleting everything in the baseDir -- so the zookeeper server was starting with an existing database already containing the solr.xml. When MiniSolrCloudCluster is used in Solr tests, the baseDir is newly created for each test class, so this doesn't happen. When I delete everything in "testcluster" and run my test code, I get the following in my logfile: http://apaste.info/Dkw There are no errors, only WARN and INFO logs. At this point, I should be able to use the client object to upload a config to zookeeper, create a collection, and do other testing. Thanks, Shawn