Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determining why an Erlang application is not starting?

Tags:

erlang

I'm trying to start an Erlang app that is failing. All I see in the shell is:

=INFO REPORT==== 7-Jan-2010::17:37:42 ===
    application: ui
    exited: {shutdown,{ui_app,start,[normal,[]]}}
    type: temporary

How can I get Erlang to give me more information as to why the application is not starting? There currently is no other output in the shell.

like image 330
Jeremy Raymond Avatar asked Jan 07 '10 22:01

Jeremy Raymond


2 Answers

You could try launching the shell with more logging support:

erl -boot start_sasl

this might get give a bit more details.

like image 88
jldupont Avatar answered Nov 18 '22 05:11

jldupont


There is a patch (tp/supervisor-pass-on-errors) that was included in release R16B. This patch makes exit reasons appear in application stop log messages, which thus become much more useful than the {shutdown,{ui_app,start,[normal,[]]}}-style messages we've had until now.

This is the entry in the README:

OTP-10490  == stdlib ==

    If a child process fails in its start function, then the
    error reason was earlier only reported as an error report
    from the error_handler, and supervisor:start_link would only
    return {error,shutdown}. This has been changed so the
    supervisor will now return {error,{shutdown,Reason}}, where
    Reason identifies the failing child and its error reason.
    (Thanks to Tomas Pihl)
like image 37
legoscia Avatar answered Nov 18 '22 04:11

legoscia