<div dir="ltr">The name of the Erlang node is the full thing, both the part before and after the @ sign.<div><a href="mailto:master@127.0.0.1">master@127.0.0.1</a> and master@myserver.l and <a href="mailto:master@127.0.0.2">master@127.0.0.2</a> are all different nodes for Erlang.</div><div><br></div><div>It is a bit confusing that epmd only stores the part of the name before the @. It is assumed that if you're talking to epmd on 127.0.0.1 or myserver.l than all the nodes you find there will have 127.0.0.1 or myserverl. in their name after the @ respectively. But this is of course not necessarily holds, since there can be multiple names/IP addresses that resolve to the same host.</div><div><br></div><div>So for example Erlang would believe <a href="mailto:master@127.0.0.1">master@127.0.0.1</a> and <a href="mailto:master@127.0.0.2">master@127.0.0.2</a> are different nodes, in practice you cannot have both nodes running at the same time, because they would both try to register as master in the same epmd instance. (Using the loopback address in the node name can lead to further complications when you have remote nodes in the cluster. E.g. you can have debug@1217.0.0.1 connected to master@myserver.l when they're on the same host, but if master@myotherserver.l would also connect to master@myserver.l it would try to connect to <a href="mailto:debug@127.0.0.1">debug@127.0.0.1</a> on myotherserver.l.)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 28 Jun 2019 at 11:06, Max Lapshin <<a href="mailto:max.lapshin@gmail.com">max.lapshin@gmail.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>myserver.l and 127.0.0.1  is the same server. I run it from this server.<br></div><div><br></div><div>There is node  called "master" in epmd and I do not understand why I can connect to it via hostname: master@myserver.l and</div><div>cannot connect to it via 127.0.0.1</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 28, 2019 at 11:53 AM Gerhard Lazu <<a href="mailto:gerhard@lazu.co.uk" target="_blank">gerhard@lazu.co.uk</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">My understanding is that you are opening a remote shell to a node with a specific name.<div><br></div><div>There is a node with name <b>master@myserver.l</b> on <b>myserver.l</b></div><div><br></div><div>There is no node with name <b><a href="mailto:master@127.0.0.1" target="_blank">master@127.0.0.1</a> </b>on host <b>127.0.0.1</b></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 28, 2019 at 9:47 AM Max Lapshin <<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.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><br></div>I have server with hostname   myserver.l<div>This hostname is in /etc/hosts and it is pingable<br><div><br></div><div>I have master node running on it with:   erl -name master@myserver.l</div></div><div><br></div><div>When I write software, I don't know what will be the hostname, so I write<br></div><div>shell script for connecting to shell:</div><div><br></div><div>erl -name debug -remsh <a href="mailto:master@127.0.0.1" target="_blank">master@127.0.0.1</a></div><div><br></div><div>It fails:</div><div><br></div><div>Erlang/OTP 21 [erts-10.3.5.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]<br><br>*** ERROR: Shell process terminated! (^G to start new job) ***<br><br></div><div>When I provide hostname, it works:</div><div><br></div><div><div>erl -name debug -remsh master@myserver.l</div><div>Erlang/OTP 21 [erts-10.3.5.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]<br><br>Eshell V10.3.5.2  (abort with ^G)<br>(master@myserver.l)1> <br></div><br class="gmail-m_6682689443118938117gmail-m_-9112983593809147752gmail-m_-8020484030490323999gmail-m_8261266340743959306gmail-Apple-interchange-newline"></div><div><br></div><div><br></div><div>What is the proper way to deal with this situation?</div><div>I can see the master node in epmd names, I can connect to it, I can pass interconnect protocol.</div><div>But I do not understand, why remsh doesn't connect to it.</div><div><br></div><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" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>
</blockquote></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" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>