couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <>
Subject Re: Solving COUCHDB-527 .
Date Sun, 29 Sep 2013 10:25:11 GMT
>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 (
>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])'
>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
>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 :)

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
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 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?

View raw message