Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DCD6103EA for ; Sun, 29 Sep 2013 10:25:42 +0000 (UTC) Received: (qmail 26716 invoked by uid 500); 29 Sep 2013 10:25:38 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 26686 invoked by uid 500); 29 Sep 2013 10:25:36 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 26677 invoked by uid 99); 29 Sep 2013 10:25:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Sep 2013 10:25:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dch@jsonified.com designates 209.85.214.42 as permitted sender) Received: from [209.85.214.42] (HELO mail-bk0-f42.google.com) (209.85.214.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Sep 2013 10:25:26 +0000 Received: by mail-bk0-f42.google.com with SMTP id my10so1624576bkb.29 for ; Sun, 29 Sep 2013 03:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jsonified.com; s=google; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:content-transfer-encoding:content-disposition; bh=1pbIvlkFVKT9/py6rPLIpBMgpzq7kZpLZGbfwtN8dIM=; b=Wy1U7WDc7c+oLpPL8gtJPv9VRnCUV96qVimWH3INC1mHpwOwVKdGNqHjIPUsCoBRkN tR+mlr9UzUlDqL/jKLC7Q1u9+YSkEp8RMHv9uamCLv9NZh/5tQGR48dcjUFaW6i3go/i niIdGNjpMCqQlrkxicxX3k9vgOxhWG1Y6igw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=1pbIvlkFVKT9/py6rPLIpBMgpzq7kZpLZGbfwtN8dIM=; b=lIJFGxI88aITktj3o2F733s8qJBHQ+v/67VFlBi9XmVs60laEkzlvO5plqUO474YwB HSdy2CaWcbAYczCSSzggNfz3XRBVe3HlE8WMkizEqFIfusTHQRZFpSct90P8EeT/mc7b BJIOHyRvvkhBgdIBs9fyNNHuzOS+bHZYDXYWlR2sPOCk+uJ4E5WZM9T+ZXgb5Y4i2s8w Mx8YQecNrhfS0kDo7Mm+/LGKWUpUbO2IWbDP5pLlvpXVovMW0GStsX0AXycm8VGIitiD 1oIRJT5fTI2eynNA9QjHAj4JHty750TbNLj8JSMLDh2b80RwLzo/qVrU9GngihgrCojE 6gjw== X-Gm-Message-State: ALoCoQlqbvogEpsZ89RmQnHnwT6fnvDmY+H83Y7hE8DdGay9LHYOyTML8JgeRm1HGEhm+jjqe3zN X-Received: by 10.205.14.69 with SMTP id pp5mr14088599bkb.14.1380450305176; Sun, 29 Sep 2013 03:25:05 -0700 (PDT) Received: from akai.jsonified.com (chello084112019176.2.11.vie.surfer.at. [84.112.19.176]) by mx.google.com with ESMTPSA id pk7sm9078592bkb.2.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Sep 2013 03:25:04 -0700 (PDT) Date: Sun, 29 Sep 2013 12:25:11 +0200 From: Dave Cottlehuber To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: Re: Solving COUCHDB-527 . X-Mailer: Airmail Beta (205) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org >Hi Everyone, > >I'm a COUCHDB user for a while now and i was really interesting to >contribute to it as much as possible.. I had been in touch with Dave during >the month of June/July and after that i was relocated some time back so i >was busy with that.. > >I'm taking up COUCHDB-527 (https://issues.apache.org/jira/browse/COUCHDB-527) >and i already added this code to do the check in couch_drv.erl file in >src/couchdb dir . > >D = filelib:is_dir(filename:join(couch_util:priv_dir(), "lib")). >case filelib:is_dir(D) of >true -> >'?LOG_ERROR("Driver loaded successfully")'; >false -> >' ?LOG_ERROR("Driver directory missing: ~s", [DirectoryName])' >end, > > >I executed 'make && sudo make install' >When i run the server it terminates with this message: > >Apache CouchDB 1.5.0+build.f714311 (LogLevel=info) is starting. >{"init terminating in >do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{application_master,start_it_old,4}]}}}}}},[{couch,start,0},{init,start_it,1},{init,start_em,1}]}} > >Crash dump was written to: erl_crash.dump >init terminating in do_boot () > >How can i move forward with this? Thank you for your help :) >-- >Regards- >Pavan Hey Pavan, Welcome back! The init stuff is painful to debug & could be lots of things. In fact having more sanity checking here would be a good 2nd thing (check we can access/read the ini files, and the {var,etc,lib}/couchdb/ dirs too. You might get something useful by starting 'erl -init_debug' & then to start up erlang solo (not as couch) and then progressively start up dependent apps, e.g.: erl -init_debug -env ERL_LIBS \ /usr/local/Cellar/couchdb/1.5.0/lib/couchdb/erlang/lib -couch_ini and then: application:load(crypto), application:start(crypto). application:load(couch), application:start(couch). When stuff in there fails, refer to the source & walk through step by step. Also, you don't need to do sudo make install, just use `make dev` like http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode Re your code, some suggestions: Consider whether your error message is unique - can you make it explicit exactly what the issue is? Does the error message reflect correctly what has happened? Is the variable name clear & matches what its being used for? Why call filelib:is_dir/1 twice? No need to answer all of that on list, but when you have something you're happy with, send a github pull request for http://github.com/apache/couchdb and we can look further there. Finally, @everybody Alex, Dirkjan how might we implement a super-easy way to find more info on a given error message in the docs? A+ Dave