Open weiss opened 2 years ago
To make sure I understand, you are relying on the fact the VM creates a cookie on boot if none is given and no ~/.erlang.cookie
file exists? But since that file isn't created until boot it isn't available to be put on a variable COOKIE
and passed to erl_rpc
?
I think the fix is to check if COOKIE
is empty before line 332 and to not pass -c
if it is -- erl_call
will read ~/.erlang.cookie
in that case.
To make sure I understand, you are relying on the fact the VM creates a cookie on boot if none is given and no
~/.erlang.cookie
file exists? But since that file isn't created until boot it isn't available to be put on a variableCOOKIE
and passed toerl_rpc
?
Yes to both.
I think the fix is to check if
COOKIE
is empty before line 332 and to not pass-c
if it is --erl_call
will read~/.erlang.cookie
in that case.
Ah yes, that might do the trick.
If no
~/.erlang.cookie
file exists and-setcookie
isn't specified, using the extended start script'sdaemon
command will hang forever waiting for RPC to work, aserl_rpc
is called without a cookie being handed over to the-c
flag. (This happens with OTP 23+, but not when using nodetool.)Not quite sure of the best way to address this. Maybe just assume that using the extended start script implies RPC, so rather than warning about a missing cookie, just create a cookie file early on (and abort if this fails)? I mean the VM will attempt to create the file anyway, unless
-(s)name
is omitted.(Kinda related to #803, where I'd like to avoid using
erl_rpc
's-c
flag if a cookie file exists.)