<div>Thanks! The directory is the same (set by the start script) but I'll have to check the PAM session limits. That's a good lead!</div><div> </div><div>Sincerely,</div><div> </div><div>jw</div><div><br clear="all">
<br>--<br>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. <br>
<br>
<br><br></div><div class="gmail_quote">On Wed, Jul 6, 2011 at 1:29 PM, Juan Jose Comellas <span dir="ltr"><<a href="mailto:juanjo@comellas.org">juanjo@comellas.org</a>></span> wrote:<br><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote">
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:<div>
<br></div><div>session required pam_limits.so</div><div><br></div><div>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).<br><br></div>
<div>Juanjo</div><div><br></div><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jul 6, 2011 at 5:05 PM, Jon Watte <span dir="ltr"><<a href="mailto:jwatte@gmail.com" target="_blank">jwatte@gmail.com</a>></span> wrote:<br>
</div></div><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"><div><div></div><div class="h5">
We're running a cluster of 11 Erlang nodes, running on R13B3 using Ubuntu 10.04 LTS 64-bit.<div>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.</div>
<div>We're seeing a mysterious crash in some cases (see below)</div><div><br></div><div>If we're logged in as the appropriate user, everything starts fine.</div><div>If we're logged in as root, and do "sudo -u username <start-command>" then beam.smp crashes with "init terminating in do_boot".</div>
<div>Why is this? I can't figure out why it's crashing like this.</div><div><br></div><div><div>{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"</div>
<div>init terminating in do_boot ()</div></div><div><br></div><div><br></div><div>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.</div>
<div>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.</div>
<div>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.</div><div><br></div><div><br></div><div>The actual start script (with secrets sanitized) is:</div>
<div><br></div><div><div> nohup erl +K true -noshell \</div><div> -env ERL_MAX_PORTS 200500 \</div><div> +W w +P 1001001 \</div><div> -boot start_sasl \</div><div> -cluster leader@domain \</div>
<div> -kernel inet_dist_listen_min 50000 inet_dist_listen_max 50009 \</div><div> -name "$node@$hostname" -setcookie "some secret" \</div><div> -callout svc_url '"<a href="http://service/%%.php" target="_blank">http://service/%%.php</a>"' \</div>
<div> -s launcher -extra $role \</div><div> </dev/null > "$logdir/$node-logfile.txt" 2>&1 &</div></div><div><br></div><div><br></div><div><br></div><div>Here's the crash-dump analysis (not very useful):</div>
<div><br></div><div><div>Slogan <span style="white-space: pre-wrap;"> </span>init terminating in do_boot ()</div><div>Node name <span style="white-space: pre-wrap;"> </span>'<a href="mailto:mqnode@AF001603.prod.imvu.com" target="_blank">mqnode@AF001603.prod.imvu.com</a>'</div>
<div>Crashdump created on <span style="white-space: pre-wrap;"> </span>Wed Jul 6 10:23:58 2011</div><div>System version <span style="white-space: pre-wrap;"> </span>Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:8:8] [rq:8] [async-threads:0] [hipe] [kernel-poll:true]</div>
<div>Compiled <span style="white-space: pre-wrap;"> </span>Fri Apr 9 12:29:55 2010</div><div>Memory allocated <span style="white-space: pre-wrap;"> </span>141146456 bytes</div><div>Atoms <span style="white-space: pre-wrap;"> </span>5690</div>
<div>Processes <span style="white-space: pre-wrap;"> </span>35</div><div>ETS tables <span style="white-space: pre-wrap;"> </span>17</div><div>Funs <span style="white-space: pre-wrap;"> </span>357</div>
<div><br></div>--<br>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. <br>
<br>
</div>
<br></div></div>_______________________________________________<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>
</blockquote></div><br>