Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 93F93C40D for ; Sat, 12 May 2012 01:17:02 +0000 (UTC) Received: (qmail 75970 invoked by uid 500); 12 May 2012 01:17:01 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 75922 invoked by uid 500); 12 May 2012 01:17:01 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 75914 invoked by uid 99); 12 May 2012 01:17:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 May 2012 01:17:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ziggythehamster@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bk0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 May 2012 01:16:53 +0000 Received: by bkcjc3 with SMTP id jc3so3555695bkc.11 for ; Fri, 11 May 2012 18:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=mXV6WzqOkpCjzTKd8TKE0ulGsXhr+RZ+9D6fBuJM/M8=; b=qaNz7kTz6eqYz6zmuRHSjbfEG5NZmqpz51V8lcf/7utsM2hB2QkJllviwlOCLevZcP L3j5M4oILnMQMa57kvU+zLl/eDOozaFLN41F0k6JJC+vR0Gw8nacpqZ99QO4OhYbRpMm mv4+38hMgLI88iuqb1cYEb24y+UjP3yiv/xnfpT+TTqzeXEWe32k8v0tWN47ya3sDS+t 3SJa4PXY7EV2Pv7Ki/i39P8uRJsGUm4V7begOYbECai6LGny3zNi4KM5Ep5LxvPWUnLO Z2rniCzd5QRYcg4aLk8ecVrfjXwmrdl7t7APHrSS5sO7UCb/QP8FU1Xd/WfsDCVv9OlR BwmQ== MIME-Version: 1.0 Received: by 10.204.152.202 with SMTP id h10mr71389bkw.85.1336785393343; Fri, 11 May 2012 18:16:33 -0700 (PDT) Sender: ziggythehamster@gmail.com Received: by 10.205.41.136 with HTTP; Fri, 11 May 2012 18:16:33 -0700 (PDT) Received: by 10.205.41.136 with HTTP; Fri, 11 May 2012 18:16:33 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 May 2012 20:16:33 -0500 X-Google-Sender-Auth: USljDIJ4XY83MMiDV8AEcNwBUoc Message-ID: Subject: Re: problems with etc/init.d/couchdb script From: Keith Gable To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015175d004a82dbec04bfcc9a9d --0015175d004a82dbec04bfcc9a9d Content-Type: text/plain; charset=ISO-8859-1 Did you chown -R? You want the files in the directory to also be owned by couchdb:couchdb. On May 11, 2012 8:13 PM, "Tim Tisdall" wrote: > 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 wrote: > > > Yes, I set r/w permission on those directories. > > > > On Thu, May 10, 2012 at 10:56 PM, Jim Klo 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" 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. > >> > > > > > --0015175d004a82dbec04bfcc9a9d--