incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Connelly <daniel.s.conne...@comcast.net>
Subject Re: Need to troubleshoot: open_error,-10
Date Tue, 22 Jul 2008 17:55:18 GMT
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. :)
>
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message