<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">erl -setcookie bob -name <a href="mailto:test1@127.0.0.1">test1@127.0.0.1</a><br></blockquote><div><br></div><div>The above translates to: start an Erlang VM with cookie bob and a name of <a href="mailto:test1@127.0.0.1">test1@127.0.0.1</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">erl -setcookie bob -name <a href="mailto:test2@127.0.0.1">test2@127.0.0.1</a> -remsh <a href="mailto:test1@192.168.86.35">test1@192.168.86.35</a></blockquote><div><br></div><div>And this translates to: start an Erlang VM with cookie bob and a name of <a href="mailto:test2@127.0.0.1">test2@127.0.0.1</a> and then open a remote shell to node with name <a href="mailto:test1@192.168.86.35">test1@192.168.86.35</a>. Your <a href="mailto:test2@127.0.0.1">test2@127.0.0.1</a> 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 <a href="mailto:test1@192.168.86.35">test1@192.168.86.35</a>. This will fail because the Erlang node running on that host has a name of <a href="mailto:test1@127.0.0.1">test1@127.0.0.1</a>.</div><div><br></div>In this working example we form a three-node cluster: <a href="https://github.com/rabbitmq/rabbitmq-prometheus/blob/master/docker/docker-compose-overview.yml">https://github.com/rabbitmq/rabbitmq-prometheus/blob/master/docker/docker-compose-overview.yml</a> . All nodes use rabbit@hostname where hostname is resolved by Docker.<div><br></div><div>There is a quick start if it helps: <a href="https://www.rabbitmq.com/prometheus.html#quick-start">https://www.rabbitmq.com/prometheus.html#quick-start</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 22, 2020 at 8:07 PM Matthew Evans <<a href="mailto:mattevans123@hotmail.com">mattevans123@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
We want to start an Erlang instance within a docker container. What we want to do is start the Erlang VM like:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
erl -setcookie bob -name <a href="mailto:test1@127.0.0.1" target="_blank">test1@127.0.0.1</a><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Since we may not have the interfaces up at that time we provide the lo address.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
When the interfaces are running we want to be able connect to that VM from a remote node with the actual address:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
erl -setcookie bob -name <a href="mailto:test2@127.0.0.1" target="_blank">test2@127.0.0.1</a> -remsh <a href="mailto:test1@192.168.86.35" target="_blank">test1@192.168.86.35</a><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
This fails...</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>

</blockquote></div>