Re: Distributed erlang question
Gerhard Lazu <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CALdE114B705P6wyZ6eKA=M0Ckv-QcO+XaYwHy-ymrhUK=nkBBA@mail.gmail.com> |
> > erl -setcookie bob -name [email protected] > The above translates to: start an Erlang VM with cookie bob and a name of [email protected] erl -setcookie bob -name [email protected] -remsh [email protected] And this translates to: start an Erlang VM with cookie bob and a name of [email protected] and then open a remote shell to node with name [email protected]. Your [email protected] node will connect to epmd on port 4369 running on 192.168.86.35 and check if there is any node running on that host with name [email protected]. This will fail because the Erlang node running on that host has a name of [email protected]. In this working example we form a three-node cluster: https://github.com/rabbitmq/rabbitmq-prometheus/blob/master/docker/docker-compose-overview.yml . All nodes use rabbit@hostname where hostname is resolved by Docker. There is a quick start if it helps: https://www.rabbitmq.com/prometheus.html#quick-start On Tue, Sep 22, 2020 at 8:07 PM Matthew Evans <[email protected]> wrote: > 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 [email protected] > > 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 [email protected] -remsh [email protected] > > 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 > >