Distributed erlang question

Gerhard Lazu gerhard@REDACTED
Tue Sep 22 23:26:26 CEST 2020

> erl -setcookie bob -name test1@REDACTED

The above translates to: start an Erlang VM with cookie bob and a name of

erl -setcookie bob -name test2@REDACTED -remsh test1@REDACTED

And this translates to: start an Erlang VM with cookie bob and a name of
test2@REDACTED and then open a remote shell to node with name
test1@REDACTED Your test2@REDACTED node will connect to epmd on
port 4369 running on and check if there is any node running
on that host with name test1@REDACTED This will fail because the
Erlang node running on that host has a name of test1@REDACTED

In this working example we form a three-node cluster:
. All nodes use rabbit@REDACTED where hostname is resolved by Docker.

There is a quick start if it helps:

On Tue, Sep 22, 2020 at 8:07 PM Matthew Evans <mattevans123@REDACTED>

> Hi,
> We want to start an Erlang instance within a docker container. What we
> want to do is start the Erlang VM like:
> erl -setcookie bob -name test1@REDACTED
> Since we may not have the interfaces up at that time we provide the lo
> address.
> When the interfaces are running we want to be able connect to that VM from
> a remote node with the actual address:
> erl -setcookie bob -name test2@REDACTED -remsh test1@REDACTED
> This fails...
> I know we can probably do this programmatically instead by starting the VM
> with no distribution and call net_kernel:start/1when the interface is
> ready. Question: is there a better way?
> Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200922/b3395950/attachment.htm>

More information about the erlang-questions mailing list