Hello folks, i read the SolrCloud Wiki and Bruno Dumon's blog entry with his "First Exploration of SolrCloud". Examples and a first setup with embedded Jetty and ZK WORKS without problems.
I tried to setup my own configuration with Tomcat and an external Zookeeper(my Master-ZK), but it doesn't work really. My setup: - latest Solr version from trunk - Tomcat 6 - external ZK - Target: 1 Server, 1 Tomcat, 1 Solr instance, 2 collections with different config/schema What i tried: ------------------ 1. After checkout i build solr(ant run-example), it works. ----------------------- 2. I send my config/schema files to external ZK with Jetty: java -Djetty.port=8080 -Dbootstrap_confdir=/root/solrCloud/conf/ -Dcollection.configName=conf1 -DzkHost=master-zk:2181 -jar start.jar it works, too. ------------------------------- 3. I create my ("empty, without cores")solr.xml, like Bruno: http://www.ngdata.com/site/blog/57-ng.html#disqus_thread ------------------------------------------- 4. I started my Tomcat, and get the first error: in UI: This interface requires that you activate the admin request handlers, add the following configuration to your solrconfig.xml: <!-- Admin Handlers - This will register all the standard admin RequestHandlers. --> <requestHandler name="/admin/" class="solr.admin.AdminHandlers" /> Admin request Handlers are definitely activated in my solrconfig. I get this error only with the latest trunk versions, with r1292064 from February not. Sometimes it works with the new version, sometimes not and i get this error. ---------------------------------- 5. Ok , it it works, after few restarts, i changed my JAVA_OPTS for Tomcat and added this: "-DzkHost=master-zk:2181" Next Error: This The web application [/solr2] appears to have started a thread named [main-SendThread(master-zk:2181)] but has failed to stop it. This is very likely to create a memory leak. Exception in thread "Thread-2" java.lang.NullPointerException at org.apache.solr.cloud.Overseer$CloudStateUpdater.amILeader(Overseer.java:179) at org.apache.solr.cloud.Overseer$CloudStateUpdater.run(Overseer.java:104) at java.lang.Thread.run(Thread.java:662) 15.03.2012 13:25:17 org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load org.apache.zookeeper.server.ZooTrace. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1531) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1196) 15.03.2012 13:25:17 org.apache.coyote.http11.Http11Protocol destroy ----------------------------------------- 6. Ok, we assume, that the first steps works, and i would create new cores and my 2 collections. My requests with CoreAdminHandler are ok, my solr.xml looks like this: <?xml version="1.0" encoding="UTF-8" ?> <solr persistent="true"> <cores adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8080" hostContext="solr"> <core name="shard1_data" collection="col1" shard="shard1" instanceDir="xxx/" /> <core name="shard2_data" collection="col2" shard="shard2" instanceDir="xx2/" /> </cores> </solr> Now i get the following exception: ".......couldn't find conf name for collection1..........." I don't have an collection 1. Why this exception? --------------------------------------- You can see, there are too many exceptions and eventually configuration problems with Tomcat and an external ZK. Has anyone set up an "identical" configuration and does it work? Does anyone detect mistakes in my configuration steps? Best regards Vadim