[erlang-questions] Mysterious boot failure

Juan Jose Comellas juanjo@REDACTED
Wed Jul 6 22:29:31 CEST 2011


I don't know if this is the cause, but if you're setting specific values for
the system limits in /etc/security/limits.conf for your user, make sure that
they're being set by PAM when executing via sudo. You can check this in
/etc/pam.d/sudo. You should look for a line like the following one and make
sure that it's not commented out:

session required pam_limits.so

Also, I'd also check that you're starting the Erlang VM in the correct
directory (i.e. one where your user has permissions to read).

Juanjo


On Wed, Jul 6, 2011 at 5:05 PM, Jon Watte <jwatte@REDACTED> wrote:

> We're running a cluster of 11 Erlang nodes, running on R13B3 using Ubuntu
> 10.04 LTS 64-bit.
> The application is installed in a subdirectory of the home directory of a
> particular user. We start the application using nohup, and with stdio/stderr
> re-direct to a log file.
> We're seeing a mysterious crash in some cases (see below)
>
> If we're logged in as the appropriate user, everything starts fine.
> If we're logged in as root, and do "sudo -u username <start-command>" then
> beam.smp crashes with "init terminating in do_boot".
> Why is this? I can't figure out why it's crashing like this.
>
> {no error logger present) error: "Error in process <0.2.0> with exit value:
> {badarg,[{erl_prim_loader,check_file_result,3},{erl_prim_loader,check_file_result,3},{init,get_boot,1},{init,get_boot,2},{init,do_boot,3}]}\n"
> init terminating in do_boot ()
>
>
> Googling on this error shows only two other web resources; one an IRC chat
> with basho, not getting an answer, and one a message on this mailing list,
> also not getting an answer.
> Reading the code, it seems as if the only way this will happen is if there
> is an error, but the "Func" argument or "Reason" argument to
> check_file_result is somehow not an atom. I don't, however, see how that
> could be happening.
> The other question is also why the boot script would not be
> visible/available at that point. The particular user has no .bashrc or other
> such init script.
>
>
> The actual start script (with secrets sanitized) is:
>
>     nohup erl +K true -noshell \
>          -env ERL_MAX_PORTS 200500 \
>          +W w +P 1001001 \
>          -boot start_sasl \
>          -cluster leader@REDACTED \
>          -kernel inet_dist_listen_min 50000 inet_dist_listen_max 50009 \
>          -name "$node@$hostname" -setcookie "some secret" \
>          -callout svc_url '"http://service/%%.php"' \
>          -s launcher -extra $role \
>          </dev/null > "$logdir/$node-logfile.txt" 2>&1 &
>
>
>
> Here's the crash-dump analysis (not very useful):
>
> Slogan init terminating in do_boot ()
> Node name 'mqnode@REDACTED'
> Crashdump created on Wed Jul 6 10:23:58 2011
> System version Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:8:8]
> [rq:8] [async-threads:0] [hipe] [kernel-poll:true]
> Compiled Fri Apr 9 12:29:55 2010
> Memory allocated 141146456 bytes
> Atoms 5690
> Processes 35
> ETS tables 17
> Funs 357
>
> --
> Americans might object: there is no way we would sacrifice our living
> standards for the benefit of people in the rest of the world. Nevertheless,
> whether we get there willingly or not, we shall soon have lower consumption
> rates, because our present rates are unsustainable.
>
>
> _______________________________________________
> 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/20110706/42a46ba5/attachment.htm>


More information about the erlang-questions mailing list