Thanks Dmitry, <div><br></div><div>After adding inets to the app config file it failed with - </div><div><br></div><div>{"init terminating in do_boot",{'cannot load',mnesia_backup,get_file}}</div><div><br>
</div><div>I then excluded mnesia in reltool.config as I am not using it (Is this the correct thing to do?)</div><div><br></div><div>Now it shows - </div><div><br></div><div>{"init terminating in do_boot",{'cannot load',erts_alloc_config,get_file}}</div>
<div><br></div><div>I tried adding erts to app config but get the same error.</div><div><br></div><div>I don't think erts can be excluded, right? </div><div><br></div><div>I am not able to understand why is it required to either include in app config or </div>
<div>exclude it in reltool config. What's going on here and who is behind the magic,</div><div>reltools or rebar :-)</div><div><br></div><div>Really appreciate all the help, it would have very difficult for me to </div>
<div>reach this far otherwise. Thanks a lot.</div><div><br><br><div class="gmail_quote">On Thu, Dec 13, 2012 at 2:46 PM, Dmitry Klionsky <span dir="ltr"><<a href="mailto:dm.klionsky@gmail.com" target="_blank">dm.klionsky@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi,<div class="im"><br>
      <br>
      >> BTW, isn't ftp in the stdlib? <br></div>
      No, it's inside the inets application<div class="im"><br>
      <br>
      >> {"init terminating in do_boot",{'cannot
      load',ftp,get_file}}<br></div>
      Maybe this will clarify things for you:
<a href="http://stackoverflow.com/questions/10417469/could-not-start-release-with-rebar-generate-epgsql" target="_blank">http://stackoverflow.com/questions/10417469/could-not-start-release-with-rebar-generate-epgsql</a><div class="im">
<br>
      <br>
      >> {app, ftp, [{incl_cond, exclude}]}, <br></div>
      This won't work. The `ftp' isn't a separate application<div class="im"><br>
      <br>
      >> {app, inets, [{incl_cond, derived}]},<br></div>
      Add {app, inets, [{incl_cond, include}]}.<br>
      But better include `inets' into a YOUR_APP.app.src file like this
<a href="http://code.google.com/p/mochiweb/source/browse/trunk/src/mochiweb.app.src" target="_blank">http://code.google.com/p/mochiweb/source/browse/trunk/src/mochiweb.app.src</a><br>
      <br>
      <br>
      Best regards,<br>
      Dmitry<div><div class="h5"><br>
      <br>
      On 12/13/2012 10:28 AM, Vineet Naik wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">On Thu, Dec 13, 2012 at 11:37 AM, Andrew Gopienko <span dir="ltr"><<a href="mailto:gopienko@gmail.com" target="_blank">gopienko@gmail.com</a>></span>
      wrote:<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          Make sure you have sasl dependency in your app file.<br>
          <br>
            {applications, [<br>
                            kernel,<br>
                            stdlib,<br>
                            sasl<br>
                           ]},</blockquote>
        <div><br>
        </div>
        <div>Thanks Andrew, that was indeed the problem why no sasl
          error log was generated. </div>
        <div>After adding sasl in applications, the error logged in it
          is,</div>
        <div><br>
        </div>
        <div>
          <div>exception exit: {undef,[{inets,start,[]},</div>
          <div>                            {exmpp_component,init,1},</div>
          <div>                            {gen_fsm,init_it,6},</div>
          <div>                           
            {proc_lib,init_p_do_apply,3}]}</div>
          <div>      in function  gen_fsm:init_it/6</div>
        </div>
        <div><br>
        </div>
        <div>I had added `{app, inets, [{incl_cond, exclude}]},` in
          reltool.config myself earlier. </div>
        <div>I tried removing that option out now and I am getting the
          following error while </div>
        <div>starting up </div>
        <div><br>
        </div>
        <div>{"init terminating in do_boot",{'cannot
          load',ftp,get_file}}</div>
        <div>
          <br>
        </div>
        <div>I was getting a series of such errors before and I could
          fix them by excluding </div>
        <div>non required libraries one by one. 'inets' was excluded in
          order to fix the error for </div>
        <div>'ftp' module. But it seems exmpp code needs inets:start/0. </div>
        <div><br>
        </div>
        <div>I tried replacing it with - </div>
        <div><br>
        </div>
        <div>{app, ftp, [{incl_cond, exclude}]}, </div>
        <div><br>
        </div>
        <div>and later</div>
        <div><br>
        </div>
        <div>{app, inets, [{incl_cond, derived}]},</div>
        <div><br>
        </div>
        <div>But both don't work. What is the correct way to configure
          this? </div>
        <div>BTW, isn't ftp in the stdlib? I can load ftp module from
          inside any erlang shell</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Vineet</div>
        <div><br>
        </div>
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>
            <div><br>
              <br>
              <div class="gmail_extra"><br>
                <br>
                <div class="gmail_quote">2012/12/13 Vineet Naik <span dir="ltr"><<a href="mailto:naikvin@gmail.com" target="_blank">naikvin@gmail.com</a>></span><br>
                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    Hi Roman, 
                    <div><br>
                    </div>
                    <div>Thanks for replying. I have
                      <release-bundle>/log/sasl but it's empty.
                      And there is no</div>
                    <div>other file/dir in log dir. Do I need to include
                      anything in code/config to make </div>
                    <div>it log errors to a file? </div>
                    <div><br>
                    </div>
                    <div>Regards,</div>
                    <div>Vineet</div>
                    <div>
                      <div>
                        <div><br>
                          <div class="gmail_quote">On Wed, Dec 12, 2012
                            at 9:27 PM, Roman Gafiyatullin <span dir="ltr"><<a href="mailto:r.gafiyatullin@me.com" target="_blank">r.gafiyatullin@me.com</a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div style="font-family:Helvetica;font-size:12px">Vineet,
                                most probably something went wrong
                                during startup.
                                <div>Can anything similar to
                                  sasl-error.log be found in
                                  the <release-bundle>/log/
                                  directory?</div>
                              </div>
                              <div>
                                <div><br>
                                </div>
                                --
                                <div>RG</div>
                                <div><br>
                                </div>
                              </div>
                              <p style="color:#a0a0a8">On Wednesday,
                                December 12, 2012 at 6:31 pm, Vineet
                                Naik wrote:</p>
                              <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
                                <span>
                                  <div>
                                    <div>Hello,
                                      <div><br>
                                      </div>
                                      <div>I am trying to package my app
                                        using rebar. `rebar generate`
                                        command runs without any</div>
                                      <div>problem (no errors at least).
                                        But when I try to start the
                                        console by running the script
                                        generated</div>
                                      <div>by rebar in bin directory, it
                                        fails with "Kernel pid
                                        terminated"</div>
                                      <div><br>
                                      </div>
                                      <div>A huge crash_dump is also
                                        created but I am not able to
                                        gather any info from it. </div>
                                      <div><br>
                                      </div>
                                      <div>I checked the erlang docs[1],
                                        I found this paragraph about the
                                        error</div>
                                      <div><br>
                                      </div>
                                      <div>
                                        <blockquote type="cite">
                                          <div>"Kernel pid terminated
                                            (Who) (Exit-reason)" - The
                                            kernel supervisor has
                                            detected a failure, usually
                                            that the
                                            application_controller has
                                            shut down (Who =
                                            application_controller, Why
                                            = shutdown). The application
                                            controller may have shut
                                            down for a number of
                                            reasons, the most usual
                                            being that the node name of
                                            the distributed Erlang node
                                            is already in use. A
                                            complete supervisor tree
                                            "crash" (i.e., the top
                                            supervisors have exited)
                                            will give about the same
                                            result. This message comes
                                            from the Erlang code and not
                                            from the virtual machine
                                            itself. It is always due to
                                            some kind of failure in an
                                            application, either within
                                            OTP or a "user-written" one.
                                            Looking at the error log for
                                            your application is probably
                                            the first step to take.</div>
                                        </blockquote>
                                        <div><br>
                                        </div>
                                        <div>If I run `console_clean`
                                          command, then the console
                                          start in the correct node.
                                          Does </div>
                                        <div>this rule out the "Node is
                                          already in use" case above? </div>
                                        <div><br>
                                        </div>
                                        <div>I also tried running the
                                          code from an erlang shell with
                                          the ebin dir paths of all
                                          required</div>
                                        <div>libs added manually to sys
                                          path and it works perfectly. </div>
                                        <div><br>
                                        </div>
                                        <div>How can I go about
                                          debugging this?  </div>
                                        <div><br>
                                        </div>
                                        <div>[1] <a href="http://www.erlang.org/doc/apps/erts/crash_dump.html#id71973" target="_blank">http://www.erlang.org/doc/apps/erts/crash_dump.html#id71973</a></div>
                                        <div><br>
                                        </div>
                                        <div>Thanks,</div>
                                        <div>Vineet</div>
                                        <br>
                                        <br>
                                      </div>
                                    </div>
                                    <div>
                                      <div>_______________________________________________</div>
                                      <div>erlang-questions mailing list</div>
                                      <div><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a></div>
                                      <div><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></div>
                                    </div>
                                  </div>
                                </span> </blockquote>
                              <div> <br>
                              </div>
                            </blockquote>
                          </div>
                          <br>
                          <br clear="all">
                          <div><br>
                          </div>
                        </div>
                      </div>
                      <span><font color="#888888">-- <br>
                          Vineet Naik<br>
                          <br>
                          <br>
                        </font></span></div>
                    <br>
                    _______________________________________________<br>
                    erlang-questions mailing list<br>
                    <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
                    <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                    <br>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      Vineet Naik<br>
      <br>
      <br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
erlang-questions mailing list
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
    <br>
    </div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
Best regards,
Dmitry Klionsky</pre>
  </font></span></div>

<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Vineet Naik<br><br><br>
</div>