[erlang-questions] Release handler seems to be not starting some applications

Edwin Fine emofine@REDACTED
Tue Sep 11 02:43:32 CEST 2012


I had the same issue. I believe it's due to reltool.config, which you 
probably generated using rebar create-node. By default rebar generates a 
reltool config that uses embedded mode and only copies 
directly-referenced beam files to the release. Since the compiler is 
never directly referenced, it never copies most of the compiler beams so 
dynamic compilation gets screwed up.

I think I changed it to have

{erts, [{mod_cond, all}, {app_file, strip}]}
...
{mod_cond, all}

You could also consider changing it to use {profile, development}.

HTH
Ed

On 09/10/2012 04:49 PM, Dmitry Demeshchuk wrote:
> Hi, Siri!
>
> I figured out that it's not important to start sasl, and it's 
> sufficient just to load it (see the included applications below the 
> started ones). Just to be sure, tried to make an upgrade that doesn't 
> stop or unload sasl, and the system still behaves in the same way.
>
> For what it's worth, the occurring error with lager is related to 
> dynamic code compiling (it's basically a copied mochiglobal module).
>
> Will try to use the latest Erlang, I've been testing this stuff in R14B04.
>
> On Mon, Sep 10, 2012 at 11:58 AM, Siri Hansen <erlangsiri@REDACTED 
> <mailto:erlangsiri@REDACTED>> wrote:
>
>     Hi Dmitry!
>     I didn't look very closely at this, but I wonder where sasl is? If
>     you are using the release_handler for upgrade, you need to include
>     sasl in your releases.
>     /siri
>
>     2012/9/8 Dmitry Demeshchuk <demeshchuk@REDACTED
>     <mailto:demeshchuk@REDACTED>>
>
>         Okay, that seems like a lager problem, it just doesn't start
>         even after starting compiler.
>
>         Moreover, it doesn't start using lager:start() and whatever
>         else. No idea why compiler isn't started though.
>
>
>         On Sat, Sep 8, 2012 at 8:37 PM, Dmitry Demeshchuk
>         <demeshchuk@REDACTED <mailto:demeshchuk@REDACTED>> wrote:
>
>             Hi, everyone.
>
>             I've been checking rebar and releases mechanisms and
>             noticed an odd thing.
>
>             First, I created a dummy release and started it. After
>             that, I added some applications to it, generated a release
>             upgrade and installed it. Surprisingly, some applications
>             haven't started, compiler and lager to be precise.
>
>             Basically, here was the initial list of applications in
>             reltool.config:
>
>                      kernel,
>                      stdlib,
>                      rels
>
>             and here's the one after my upgrade:
>
>                      kernel,
>                      stdlib,
>                      riak_err,
>                      compiler,
>                      syntax_tools,
>                      lager,
>                      rels
>
>             No errors, no warnings, compiler and lager just silently
>             fail to start, though their starting instructions do exist
>             in relup. Tried to start them manually -- works like a charm.
>
>             Here's a short exapmle: https://github.com/doubleyou/rels
>             To reproduce, switch to the initial commit, build,
>             generate release. Then switch to the second commit, build,
>             generate release upgrade, install.
>
>
>             Any suggestions?
>
>             -- 
>             Best regards,
>             Dmitry Demeshchuk
>
>
>
>
>         -- 
>         Best regards,
>         Dmitry Demeshchuk
>
>         _______________________________________________
>         erlang-questions mailing list
>         erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>         http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
>
> -- 
> Best regards,
> Dmitry Demeshchuk
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120910/af654b9d/attachment.htm>


More information about the erlang-questions mailing list