Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 24018 invoked from network); 22 Jul 2008 17:53:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jul 2008 17:53:36 -0000 Received: (qmail 14916 invoked by uid 500); 22 Jul 2008 17:53:34 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 14868 invoked by uid 500); 22 Jul 2008 17:53:34 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 14839 invoked by uid 99); 22 Jul 2008 17:53:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 10:53:34 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daniel.s.connelly@comcast.net designates 76.96.30.80 as permitted sender) Received: from [76.96.30.80] (HELO QMTA08.emeryville.ca.mail.comcast.net) (76.96.30.80) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 17:52:38 +0000 Received: from OMTA06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id szga1Z00716AWCUA85t243; Tue, 22 Jul 2008 17:53:02 +0000 Received: from [192.168.0.4] ([75.69.193.230]) by OMTA06.emeryville.ca.mail.comcast.net with comcast id t5t11Z0024yjG4T8S5t1hw; Tue, 22 Jul 2008 17:53:02 +0000 X-Authority-Analysis: v=1.0 c=1 a=7nWePE4DAQEA:10 a=o7_FNkP-XWYA:10 a=RPBDpc5YCDCDXL9mHxQA:9 a=l5B8ezG5DM8LXLQ98HAA:9 a=726BQhhAkmx4xNpUMLoA:7 a=-laPiUZFEi0AxK0rw2EAIioJeSwA:4 a=6-x43y6uxGMA:10 a=nRWb2c4QcClN7PFOUskA:9 a=I7vhwFeRNhAU-Q63UaAA:7 a=2HUKhYQ_0HW9qDce163nxSu388MA:4 a=E8SXbOu_OasA:10 a=AfD3MYMu9mQA:10 Message-ID: <48861F06.6000306@comcast.net> Date: Tue, 22 Jul 2008 13:55:18 -0400 From: Dan Connelly User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: couchdb-user@incubator.apache.org Subject: Re: Need to troubleshoot: open_error,-10 References: <48853B55.1000408@comcast.net> <4885CB2D.101@comcast.net> <20080722123009.GA13592@bytesexual.org> <4885F2A5.3060004@comcast.net> <20080722154259.GA14667@bytesexual.org> In-Reply-To: <20080722154259.GA14667@bytesexual.org> X-Enigmail-Version: 0.95.6 Content-Type: multipart/alternative; boundary="------------090503090007070203010804" X-Virus-Checked: Checked by ClamAV on apache.org --------------090503090007070203010804 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Noah Slater wrote: > On Tue, Jul 22, 2008 at 10:45:57AM -0400, Dan Connelly wrote: > >> It seems that the "couchdb" script effectively ignores the LD_LIBRARY_PATH >> setting. (So, I am still not sure what the "correct" setting would be.) >> > > Someone suggested to me that the `su` invocation in the `/etc/init.d/couchdb` > script should properly initialise the `couchdb` user's environment. > > Are you running CouchDB from the init script as the superuser? > Not as superuser. I enter "couchdb" at my personal bash prompt. I am in the "dev" group. I did need to give dev g+w permission in 2 couchdb directories to get this going. Those were the only necessary changes to run as a normal user in the dev group, which is what I want. > If so, this might be the problem. > > Who originally suggested this may be a problem? Please speak up. > > If you are not invoking CouchDB in this method, I am quite confused. The > LD_LIBRARY_PATH environment variable should not be ignored. > > /strace/ shows system calls, right? I would not expect to see shell env variables in the system calls. But I see the literal "${LD_LIBRARY_PATH}" in the fopen path strings for libjs.so, without substitution. I believe this is wrong. >> I moved my just-built libjs.so into /usr/lib from /usr/local/js/lib (which dir >> had been designated on my LD_LIBRARY_PATH) and everything is good. /usr/lib is >> searched by default, it seems. >> > > If you move it back and export LD_LIBRARY_PATH=/usr/local/js/lib does it work? > Nope. This fails for me. Does it work for you? Can you verify (using strace) the actual file "open" path that reads libjs.so? Here is what I see: ... close(7) = 0 open("/usr/lib/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/tls/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/tls/i686/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/tls/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/i686/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("${LD_LIBRARY_PATH}/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 7 fstat64(7, {st_mode=S_IFREG|0644, st_size=107110, ...}) = 0 mmap2(NULL, 107110, PROT_READ, MAP_PRIVATE, 7, 0) = 0xb6b66000 close(7) = 0 open("/lib/tls/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/i686/sse2", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/tls/i686/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/i686", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/tls/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/sse2", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/i686/sse2", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/i686/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/i686", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/sse2", 0xbfaa3878) = -1 ENOENT (No such file or directory) open("/lib/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/usr/lib/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) munmap(0xb6b66000, 107110) = 0 munmap(0xb7f14000, 8380) = 0 munmap(0xb7675000, 1177788) = 0 munmap(0xb6cc5000, 10158080) = 0 munmap(0xb6b81000, 1326168) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 3), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f16000 write(1, "{\"init terminating in do_boot\",{"..., 58) = 58 ... This one should have worked if open understood environment variable: open("${LD_LIBRARY_PATH}/libjs.so", O_RDONLY) = -1 ENOENT (No such file or directory) Note: dan32@Sun:~> echo $LD_LIBRARY_PATH /usr/local/js/lib > >> Which part of my Analysis/Fix would you like me to transcribe to the wiki? >> > > Well, we need to get to the bottom of the problem first. :) > > --------------090503090007070203010804--