couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <...@jsonified.com>
Subject Re: Tracking down missing runtime dependencies
Date Sun, 16 Dec 2012 09:43:38 GMT
Hi Hans,

That's odd. If you can post the output of the build phase (configure +
make both) somewhere that will help.

Are you using build-couchdb for this?

The general approach is to start up using the same erlang parameters
as in `couchdb -i` but without the `-s couch`. This will dump you into
an erlang shell and you can work through from there. You can add
-init_debug to the mix as well, but I find the output is not
particularly helpful.

{progress,preloaded}
{progress,kernel_load_completed}
{progress,modules_loaded}
{start,heart}
{start,error_logger}
{start,application_controller}
{progress,init_kernel_started}
{apply,{application,load,[{application,stdlib,[{description,"ERTS  CXC
138 10"},{vsn,"1.18.3"},{id,[]},{modules,[array,base64,beam_lib,binary,c,calendar,dets,dets_server,dets_sup,dets_utils,dets_v8,dets_v9,dict,digraph,digraph_utils,edlin,edlin_expand,epp,eval_bits,erl_bits,erl_compile,erl_eval,erl_expand_records,erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,erl_scan,erl_tar,error_logger_file_h,error_logger_tty_h,escript,ets,file_sorter,filelib,filename,gb_trees,gb_sets,gen,gen_event,gen_fsm,gen_server,io,io_lib,io_lib_format,io_lib_fread,io_lib_pretty,lib,lists,log_mf_h,math,ms_transform,orddict,ordsets,otp_internal,pg,pool,proc_lib,proplists,qlc,qlc_pt,queue,random,re,sets,shell,shell_default,slave,sofs,string,supervisor,supervisor_bridge,sys,timer,unicode,win32reg,zip]},{registered,[timer_server,rsh_starter,take_over_monitor,pool_master,dets]},{applications,[kernel]},{included_applications,[]},{env,[]},{maxT,infinity},{maxP,infinity}]}]}}
{progress,applications_loaded}
{apply,{application,start_boot,[kernel,permanent]}}
Erlang R15B03 (erts-5.9.3) [source] [64-bit] [smp:8:8]
[async-threads:4] [hipe] [kernel-poll:true] [dtrace]

{apply,{application,start_boot,[stdlib,permanent]}}
{apply,{c,erlangrc,[]}}
{progress,started}
Eshell V5.9.3  (abort with ^G)
(icouch@akai)1> Apache CouchDB 1.2.0 (LogLevel=debug) is starting.
Configuration Settings ["/usr/local/etc/couchdb/default.ini",
….

http://mail-archives.apache.org/mod_mbox/couchdb-user/201205.mbox/%3CCAKrexVKSaK8CM-4sYmmrbfFuunm09reGUTib6UV-=QFRC9Nezw@mail.gmail.com%3E

If erlang starts up fine, you more or less do:

application:start(crypto).
application:start(couch).

and eventually one of them will bork.


IIRC neither icu, ejson or snappy are required for couch to start up.

application:start(ejson).
application:start(snappy).

A+
Dave

On 16 December 2012 09:12, Hans J Schroeder <hs@cloudno.de> wrote:
> Hi,
>
> I have trouble to get the latest build from the 1.3.x branch running. The error is since
Dec 11th. The build runs through so far, but when I start couchdb, I get the famous "init
terminating in do_boot" error. I am sure there is a missing native dependency, but neither
the log nor the crash_dump is giving a hint which component, icu, ejson, crypto,... is not
satisfied.
>
> Is there any way to track this down other than trail and error?
>
> The error message is always the same, despite which lib is missing or has missing dependencies:
>
> Apache CouchDB 1.3.0a-a325083-git (LogLevel=info) is starting.
> {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/Users/hs/prj/build-couchdb-

basically this is saying that the application you're requesting to
start erlang with (via `-s couch` in our case) isn't running so the VM
shuts down.

If you exclude the `-s couch` from startup you can walk through these
steps manually, following what couch does during the startup phase
until you find something illuminating.

Some useful links:

the overall application & related erlang / vm dependencies:

https://github.com/apache/couchdb/blob/1.3.x/src/couchdb/couch.app.tpl.in

the start function (load config files, start beam dependencies):

https://github.com/apache/couchdb/blob/1.3.x/src/couchdb/couch_app.erl

the couch initialisation:

https://github.com/apache/couchdb/blob/1.3.x/src/couchdb/couch_server_sup.erl

That should get you 90% of the way there -- happy spelunking!

1.3/build/etc/couchdb/default.ini","/Users/hs/prj/build-couchdb-1.3/build/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"/Users/hs/prj/build-couchdb-1.3/git-build/git@github.com%3Aapache%2Fcouchdb.git%3A1.3.x/src/couchdb/couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"/Users/hs/prj/build-couchdb-1.3/git-build/git@github.com%3Aapache%2Fcouchdb.git%3A1.3.x/src/couchdb/couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>
> Crash dump was written to: erl_crash.dump
> init terminating in do_boot ()
>
> - Hans

Mime
View raw message