Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 9619 invoked from network); 3 Mar 2009 16:54:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2009 16:54:06 -0000 Received: (qmail 21842 invoked by uid 500); 3 Mar 2009 16:54:02 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 21809 invoked by uid 500); 3 Mar 2009 16:54:01 -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 21798 invoked by uid 99); 3 Mar 2009 16:54:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2009 08:54:01 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of goodieboy@gmail.com designates 209.85.132.251 as permitted sender) Received: from [209.85.132.251] (HELO an-out-0708.google.com) (209.85.132.251) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2009 16:53:50 +0000 Received: by an-out-0708.google.com with SMTP id c37so1522942anc.5 for ; Tue, 03 Mar 2009 08:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=mmWqYJPRvZw/jqytHGB08Ztp0Xy2GODyl5SUxwFKa6Y=; b=kc00Gw559fONJMWYT3gwZZz8+9dNmPAqfQduSFazQO0eo7hEfeDdewelutfMfUK1UH ly81XaIpCwVHERZu37wCkRt+CslaXwfwSuqLVkqc8RyAWJmUWqAWVahzONXcQRC86New qgVhqgpDAXypXBh1EdsoCrBeImxRcabsLmoK0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=WL4u58KlHyQKSyF6dgGmF7M43S00GVLYjUOEuPizGZJzGYToZmGT0O4ckWvAxJVGbO laNBDATX/P1TZc9GbB1O57MZZmbTAeVXdfuyqx3jpJakNHxZZaIJ4uBJ/xshp9Sfne08 cbH6kxC+KZnkHSp12lvtV2/0eZgJRixv68Bxc= MIME-Version: 1.0 Received: by 10.142.241.15 with SMTP id o15mr3688012wfh.258.1236099209018; Tue, 03 Mar 2009 08:53:29 -0800 (PST) In-Reply-To: References: Date: Tue, 3 Mar 2009 11:53:28 -0500 Message-ID: Subject: Re: solr and tomcat From: Matt Mitchell To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd1469042bd78046439c69a X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1469042bd78046439c69a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit That's exactly what we're doing (setting the value in each config). The main problem with that is we have multiple people working on each of these solr projects, in different environments. Their data.dir path is always the same (relative) value which works fine under Jetty. But running under tomcat, the data dir is relative to tomcat's home. So an absolute hard-coded path is the only solution. My hope was that we'd be able to override it using the same method as setting the "solr/home" value in the tomcat context file. The thought of running multiple tomcats is interesting. Do you have any issues with memory or cpu performance? Thanks, Matt On Tue, Mar 3, 2009 at 11:45 AM, Matthew Runo wrote: > Perhaps you could hard code it in the solrconfig.xml file for each solr > instance? Other than that, what we did was run multiple instances of Tomcat. > That way if something goes bad in one, it doesn't affect the others. > > Thanks for your time! > > Matthew Runo > Software Engineer, Zappos.com > mruno@zappos.com - 702-943-7833 > > On Mar 3, 2009, at 8:39 AM, Matt Mitchell wrote: > > Hi Matthew, >> >> The problem is that we have multiple instances of solr running under one >> tomcat. So setting -Dsolr.data.dir=foo would set the home for every solr. >> I >> guess multi-core might solve my problem, but that'd change our app >> architecture too much, maybe some other day. >> >> I *kind* of have a solution for the permissions thing though: >> >> - The project user is part of the tomcat group. >> - The tomcat user is part of the project user group. >> - We're making a call to "umask 002" in the tomcat catalina.sh file (means >> all files created will have group write) >> >> So when solr (tomcat) creates the index, they're group writable now and I >> can remove etc.! >> >> So, I still need to figure out the data.dir problem. Hmm. >> >> Thanks for your help, >> Matt >> >> On Tue, Mar 3, 2009 at 11:31 AM, Matthew Runo wrote: >> >> It looks like if you set a -Dsolr.data.dir=foo then you could specify >>> where >>> the index would be stored, yes? Are you properly setting your solr.home? >>> I've never had to set the data directory specifically, Solr has always >>> put >>> it under my home. >>> >>> From solrconfig.xml: >>> ${solr.data.dir:./solr/data} >>> >>> Since Solr is running under tomcat, I'd assume that the index will always >>> appear to be owned by tomcat as well. I don't think there is any way to >>> have >>> a different user for the written files - but someone else might want to >>> chime in before you believe me 100% on this one. >>> >>> Thanks for your time! >>> >>> Matthew Runo >>> Software Engineer, Zappos.com >>> mruno@zappos.com - 702-943-7833 >>> >>> >>> On Mar 2, 2009, at 5:46 PM, Matt Mitchell wrote: >>> >>> Hi. I'm sorry if this is the second time this message comes through! >>> >>>> >>>> A few questions here... >>>> >>>> #1 >>>> Does anyone know how to set the user/group and/or permissions on the >>>> index >>>> that solr creates? It's always the tomcat user. Is it possible to change >>>> this in my context file? Help! >>>> >>>> #2 >>>> I'm deploying Solr via Tomcat and really thought I had this stuff down. >>>> But >>>> it seems that with some recent system upgrades, my scheme is failing to >>>> set >>>> the data dir correctly. >>>> >>>> I'm deploying solr to tomcat, using a context file as described here: >>>> >>>> >>>> http://wiki.apache.org/solr/SolrTomcat#head-024d7e11209030f1dbcac9974e55106abae837ac >>>> >>>> But when I deploy, Tomcat says that it can't find a ./data/index >>>> directory >>>> -- relative to the tomcat home directory. How can I set the data dir >>>> relative to the solr home value I'm specifying in the tomcat context >>>> file? >>>> Note: a hard-coded absolute path works, but I want to configure at >>>> deployment time. >>>> >>>> In the past, I tried setting the data dir in the same way the solr home >>>> is >>>> set in the context file without luck. Does this now work in the latest >>>> solr >>>> nightly? >>>> >>>> Thanks, >>>> >>>> >>> >>> > --000e0cd1469042bd78046439c69a--