incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Tisdall <tisd...@gmail.com>
Subject Re: problems with etc/init.d/couchdb script
Date Sat, 12 May 2012 01:12:58 GMT
Okay, I managed to figure out the problem with outputting STDERR, I had
mistyped the path in /etc/default/couchdb.  oops!  So, now I can get a
little more details on the problem...  Here's what I get from STDOUT when
running /etc/init.d/couchdb:

-------------------------
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: .. Function: read_file_info. Proces
s: code_server."}
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: ./standard_error.beam. Function: ge
t_file. Process: code_server."}
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: ./supervisor_bridge.beam. Function:
 get_file. Process: code_server."}
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: ./user_sup.beam. Function: get_file
. Process: code_server."}
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: ./user.beam. Function: get_file. Pr
ocess: code_server."}
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: ./kernel_config.beam. Function: get
_file. Process: code_server."}
{error_logger,{{2012,5,12},{0,17,27}},std_error,"File operation error:
eacces. Target: ./queue.beam. Function: get_file. P
rocess: code_server."}

=ERROR REPORT==== 12-May-2012::00:17:27 ===
File operation error: eacces. Target: .. Function: read_file_info. Process:
code_server.

=ERROR REPORT==== 12-May-2012::00:17:27 ===
File operation error: eacces. Target: ./standard_error.beam. Function:
get_file. Process: code_server.

=ERROR REPORT==== 12-May-2012::00:17:27 ===
File operation error: eacces. Target: ./supervisor_bridge.beam. Function:
get_file. Process: code_server.

=ERROR REPORT==== 12-May-2012::00:17:27 ===
File operation error: eacces. Target: ./user_sup.beam. Function: get_file.
Process: code_server.

=ERROR REPORT==== 12-May-2012::00:17:27 ===
File operation error: eacces. Target: ./user.beam. Function: get_file.
Process: code_server.

=ERROR REPORT==== 12-May-2012::00:17:27 ===
File operation error: eacces. Target: ./kernel_config.beam. Function:
get_file. Process: code_server.

------ SNIP -----------------


Here's something telling:
=ERROR REPORT==== 12-May-2012::00:17:27 ===
file:path_eval([".","/var/lib/couchdb"],".erlang"): permission denied

I've set /var/lib/couchdb to be owned and writable by the "couchdb" user,
but the files being created in there all belong to root.

Again, everything works fine if I run 'couchdb -b', but the init.d script
results in this:

# curl http://localhost:5984/
curl: (7) couldn't connect to host





On Thu, May 10, 2012 at 10:58 PM, Tim Tisdall <tisdall@gmail.com> wrote:

> Yes, I set r/w permission on those directories.
>
> On Thu, May 10, 2012 at 10:56 PM, Jim Klo <jim.klo@sri.com> wrote:
>
>> The init.d script runs suid. Does your CouchDB user have read and write
>> permissions to /var/{log,lib}/couchdb?
>>
>> - Jim
>>
>> Sent from my iPhone
>>
>> On May 10, 2012, at 11:46 AM, "Tim Tisdall" <tisdall@gmail.com> wrote:
>>
>> > I've tried doing lots of Google searches for an answer to this, but I
>> > haven't been successful...
>> >
>> > I've installed Couchdb 1.2 from source on Debian 6.  I configured it
>> > with *--localstatedir=/var
>> > --sysconfdir=/etc . Everything seems to be installed correctly.*
>> > *
>> > *
>> > *If I run couchdb from the command prompt it seems to run correctly and
>> I'm
>> > able to hit the port with curl and get
>> *{"couchdb":"Welcome","version":"1.2.0"}
>> > successfully. If I run it as "couchdb -b" it also works properly.
>> >
>> > Now, the problem... if I try to run things using /etc/init.d/couchdb it
>> > doesn't seem to work properly. I don't get any error messages but the
>> curl
>> > request returns "couldn't connect to host". Also, there seems to be a
>> > process running under the couchdb user id, but it's not the same process
>> > number as what's found in /var/run/couchdb/couchdb.pid. ps reports it as
>> > "/bin/sh -e /usr/local/bin/couchdb -a /etc/couchdb/default.ini -a
>> > /etc/couchdb/local.ini -b -r 5 -p /var/run/couchdb/couchdb.pid -o
>> /dev/null
>> > -e /dev/null -R" but there's no response using curl.
>> >
>> > Anyone have any ideas how to track down the problem? I don't see any
>> errors
>> > in the logs.
>> >
>> > I've tried redirecting the STDERR to /dev/log/couchdb/stderr.log but get
>> > the error "Starting database server: couchdbApache CouchDB needs write
>> > permission on the STDERR file: /dev/log/couchdb/stderr.log" despite
>> giving
>> > it full write permissions.
>>
>
>

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