Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37AA6F9C1 for ; Wed, 10 Apr 2013 17:13:30 +0000 (UTC) Received: (qmail 47077 invoked by uid 500); 10 Apr 2013 17:13:26 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 46998 invoked by uid 500); 10 Apr 2013 17:13:26 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 46989 invoked by uid 99); 10 Apr 2013 17:13:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 17:13:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of joelsolr@gmail.com designates 209.85.223.179 as permitted sender) Received: from [209.85.223.179] (HELO mail-ie0-f179.google.com) (209.85.223.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 17:13:20 +0000 Received: by mail-ie0-f179.google.com with SMTP id k11so861323iea.24 for ; Wed, 10 Apr 2013 10:12:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Xyo0cE48bUdqawn0NHiOg5PsdB6RW0nHsww4690ogPM=; b=XWD1K8Fg7uOLdz+WNg8ayNnL6EqeniHLlYGUZVnY5hyEw/GXqCaOtxdDS7hyajMzDY 0j2PsfCkSu7LUbtget/x7275zi2DeYrOb/eCQ9N7KoOvbFuCrXB154EYFDSTZgcZMakf ZILgEb0BrxN0wNBl6Ba3CIsQ3A2A8ROcBKWGqafwzhTkOmwkrAd3/xZxRCj0Kjbbj6Qj wRUWAKrb59UGNdfU7UtMQOyAlY5790rMSF7Z+ug0ZzVhwVuVlRN4Xg97hy9VcYVICrMY rHkYiR3yx+aAv6uBITEIvJYvJKxx7xZkbByJcHrZ+9U6HURQxK+4tnQmNiSMAqU6TJ1h yMMw== MIME-Version: 1.0 X-Received: by 10.50.30.104 with SMTP id r8mr2146855igh.9.1365613979094; Wed, 10 Apr 2013 10:12:59 -0700 (PDT) Received: by 10.42.156.69 with HTTP; Wed, 10 Apr 2013 10:12:58 -0700 (PDT) In-Reply-To: <51651819.2090305@yahoo.de> References: <5162C76B.4040706@yahoo.de> <5163CFA3.5080207@yahoo.de> <51651819.2090305@yahoo.de> Date: Wed, 10 Apr 2013 13:12:58 -0400 Message-ID: Subject: Re: Empty Solr 4.2.1 can not create Collection From: Joel Bernstein To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7bdca2ec1fd44304da04c802 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdca2ec1fd44304da04c802 Content-Type: text/plain; charset=ISO-8859-1 Can you post what your clusterstate.json? After you spin up the initial core, it will automatically become leader for that shard. On Wed, Apr 10, 2013 at 3:43 AM, A.Eibner wrote: > Hi Joel, > > I followed your steps, the cores and collection get created, but there is > no leader elected so I can not query the collection... > Do I miss something ? > > Kind Regards > Alexander > > Am 2013-04-09 10:21, schrieb A.Eibner: > > Hi, >> thanks for your faster answer. >> >> You don't use the Collection API - may I ask you why ? >> Therefore you have to setup everything (replicas, ...) manually..., >> which I would like to avoid. >> >> Also what I don't understand, why my steps work in 4.0 but won't in >> 4.2.1... >> Any clues ? >> >> Kind Regards >> Alexander >> >> Am 2013-04-08 19:12, schrieb Joel Bernstein: >> >>> The steps that I use to setup the collection are slightly different: >>> >>> >>> 1) Start zk and upconfig the config set. Your approach is same. >>> 2) Start appservers with Solr zkHost set to the zk started in step 1. >>> 3) Use a core admin command to spin up a new core and collection. >>> >>> >>> http://app01/solr/admin/cores?**action=CREATE&name=storage-** >>> core&collection=storage&**numShards=1&collection.** >>> configName=storage-conf >>> >> numShards=1&replicationFactor=**2&collection.configName=**storage-conf >>> > >>> >>> &shard=shard1 >>> >>> This will spin up the new collection and initial core. I'm not using a >>> replication factor because the following commands manually bind the >>> replicas. >>> >>> 4) Spin up replica with a core admin command: >>> http://app02/solr/admin/cores?**action=CREATE&name=storage-** >>> core&collection=storage& >>> >> name=storage&numShards=1&**replicationFactor=2&** >>> collection.configName=storage-**conf >>> > >>> >>> shard=shard1 >>> >>> 5) Same command as above on the 3rd server to spin up another replica. >>> >>> This will spin up a new core and bind it to shard1 of the storage >>> collection. >>> >>> >>> >>> >>> >>> On Mon, Apr 8, 2013 at 9:34 AM, A.Eibner wrote: >>> >>> Hi, >>>> >>>> I have a problem with setting up my solr cloud environment (on three >>>> machines). >>>> If I want to create my collections from scratch I do the following: >>>> >>>> *) Start ZooKeeper on all machines. >>>> >>>> *) Upload the configuration (on app02) for the collection via the >>>> following command: >>>> zkcli.sh -cmd upconfig --zkhost app01:4181,app02:4181,app03:**** >>>> 4181 >>>> --confdir config/solr/storage/conf/ --confname storage-conf >>>> >>>> *) Linking the configuration (on app02) via the following command: >>>> zkcli.sh -cmd linkconfig --collection storage --confname >>>> storage-conf >>>> --zkhost app01:4181,app02:4181,app03:****4181 >>>> >>>> *) Start Tomcats (containing Solr) on app02,app03 >>>> >>>> *) Create Collection via: >>>> http://app03/solr/admin/****collections?action=CREATE&** >>>> name=storage&numShards=1&****replicationFactor=2&** >>>> collection.configName=storage-****conf>>> admin/collections?action=**CREATE&name=storage&numShards=** >>>> 1&replicationFactor=2&**collection.configName=storage-**conf >>>> > >>>> >>>> >>>> This creates the replication of the shard on app02 and app03, but >>>> neither >>>> of them is marked as leader, both are marked as DOWN. >>>> And after wards I can not access the collection. >>>> In the browser I get: >>>> "SEVERE: org.apache.solr.common.****SolrException: no servers hosting >>>> shard:" >>>> >>>> In the log files the following error is present: >>>> SEVERE: Error from shard: app02:9985/solr >>>> org.apache.solr.common.****SolrException: Error CREATEing SolrCore >>>> 'storage_shard1_replica1': >>>> at >>>> org.apache.solr.client.solrj.****impl.HttpSolrServer.request(**** >>>> HttpSolrServer.java:404) >>>> at >>>> org.apache.solr.client.solrj.****impl.HttpSolrServer.request(**** >>>> HttpSolrServer.java:181) >>>> at org.apache.solr.handler.****component.HttpShardHandler$1.** >>>> ** >>>> call(HttpShardHandler.java:****172) >>>> at org.apache.solr.handler.****component.HttpShardHandler$1.** >>>> ** >>>> call(HttpShardHandler.java:****135) >>>> at java.util.concurrent.****FutureTask$Sync.innerRun(** >>>> FutureTask.java:334) >>>> at java.util.concurrent.****FutureTask.run(FutureTask.**** >>>> java:166) >>>> at java.util.concurrent.****Executors$RunnableAdapter.** >>>> call(Executors.java:471) >>>> at java.util.concurrent.****FutureTask$Sync.innerRun(** >>>> FutureTask.java:334) >>>> at java.util.concurrent.****FutureTask.run(FutureTask.**** >>>> java:166) >>>> at java.util.concurrent.****ThreadPoolExecutor.runWorker(**** >>>> ThreadPoolExecutor.java:1110) >>>> at java.util.concurrent.****ThreadPoolExecutor$Worker.run(**** >>>> ThreadPoolExecutor.java:603) >>>> at java.lang.Thread.run(Thread.****java:722) >>>> Caused by: org.apache.solr.common.cloud.****ZooKeeperException: >>>> at org.apache.solr.core.****CoreContainer.registerInZk(** >>>> CoreContainer.java:922) >>>> at org.apache.solr.core.****CoreContainer.registerCore(** >>>> CoreContainer.java:892) >>>> at org.apache.solr.core.****CoreContainer.register(** >>>> CoreContainer.java:841) >>>> at org.apache.solr.handler.admin.****CoreAdminHandler.** >>>> handleCreateAction(****CoreAdminHandler.java:479) >>>> ... 19 more >>>> Caused by: org.apache.solr.common.****SolrException: Error getting >>>> leader >>>> from zk for shard shard1 >>>> at org.apache.solr.cloud.****ZkController.getLeader(** >>>> ZkController.java:864) >>>> at org.apache.solr.cloud.****ZkController.register(** >>>> ZkController.java:776) >>>> at org.apache.solr.cloud.****ZkController.register(** >>>> ZkController.java:727) >>>> at org.apache.solr.core.****CoreContainer.registerInZk(** >>>> CoreContainer.java:908) >>>> ... 22 more >>>> Caused by: java.lang.****InterruptedException: sleep interrupted >>>> at java.lang.Thread.sleep(Native Method) >>>> at org.apache.solr.cloud.****ZkController.getLeaderProps(** >>>> ZkController.java:905) >>>> at org.apache.solr.cloud.****ZkController.getLeaderProps(** >>>> ZkController.java:875) >>>> at org.apache.solr.cloud.****ZkController.getLeader(** >>>> ZkController.java:839) >>>> ... 25 more >>>> >>>> I have attached a minimal set of configuration files which are needed to >>>> replicate this error, also containing the log files for the commands >>>> I have >>>> run in the order above. >>>> >>>> I use the following versions of: >>>> Solr: 4.2.1 >>>> ZooKeeper: 3.4.5 >>>> Tomcat 7.0.27 >>>> >>>> app01: ZooKeeper >>>> app02: ZooKeeper, Solr (in Tomcat) >>>> app03: ZooKeeper, Solr (in Tomcat) >>>> >>>> The same procedure does work if I use Solr 4.0, but the BUG ( >>>> https://issues.apache.org/****jira/browse/SOLR-3939 >>>> >>>> > >>>> >>>> ) prevents me from using 4.0 in this scenario. >>>> >>>> If you need anything else, please just say so. >>>> >>>> Thanks for your help >>>> >>>> Kind Regards >>>> Alexander >>>> >>>> >>>> >>> >>> >> >> > -- Joel Bernstein Professional Services LucidWorks --047d7bdca2ec1fd44304da04c802--