[erlang-questions] Interconnect question: how to work with names

Eckard Brauer eckard.brauer@REDACTED
Sun Jun 30 12:21:36 CEST 2019


So IMHO it could be wise to (more) explicitely point out that name
resolution in Erlang is at least partially different from the system one
(nsswitch.conf), and to include a compact description on that in the
manual (didn't check if it already is there). Seems the question arises
from time to time...

Best regards,
Eckard

Am Fri, 28 Jun 2019 11:17:13 +0200
schrieb Dániel Szoboszlay <dszoboszlay@REDACTED>:

> The name of the Erlang node is the full thing, both the part before
> and after the @ sign.
> master@REDACTED and master@REDACTED and master@REDACTED are all
> different nodes for Erlang.
> 
> 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.
> 
> So for example Erlang would believe master@REDACTED and
> master@REDACTED 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@REDACTED
> connected to master@REDACTED when they're on the same host, but if
> master@REDACTED would also connect to master@REDACTED it
> would try to connect to debug@REDACTED on myotherserver.l.)
> 
> On Fri, 28 Jun 2019 at 11:06, Max Lapshin <max.lapshin@REDACTED>
> wrote:
> 
> > myserver.l and 127.0.0.1  is the same server. I run it from this
> > server.
> >
> > There is node  called "master" in epmd and I do not understand why
> > I can connect to it via hostname: master@REDACTED and
> > cannot connect to it via 127.0.0.1
> >
> >
> > On Fri, Jun 28, 2019 at 11:53 AM Gerhard Lazu <gerhard@REDACTED>
> > wrote:
> >
> >> My understanding is that you are opening a remote shell to a node
> >> with a specific name.
> >>
> >> There is a node with name *master@REDACTED* on *myserver.l*
> >>
> >> There is no node with name *master@REDACTED <master@REDACTED>
> >> *on host *127.0.0.1*
> >>
> >> On Fri, Jun 28, 2019 at 9:47 AM Max Lapshin <max.lapshin@REDACTED>
> >> wrote:
> >>
> >>>
> >>> I have server with hostname   myserver.l
> >>> This hostname is in /etc/hosts and it is pingable
> >>>
> >>> I have master node running on it with:   erl -name
> >>> master@REDACTED
> >>>
> >>> When I write software, I don't know what will be the hostname, so
> >>> I write shell script for connecting to shell:
> >>>
> >>> erl -name debug -remsh master@REDACTED
> >>>
> >>> It fails:
> >>>
> >>> Erlang/OTP 21 [erts-10.3.5.2] [source] [64-bit] [smp:8:8]
> >>> [ds:8:8:10] [async-threads:1] [hipe]
> >>>
> >>> *** ERROR: Shell process terminated! (^G to start new job) ***
> >>>
> >>> When I provide hostname, it works:
> >>>
> >>> erl -name debug -remsh master@REDACTED
> >>> Erlang/OTP 21 [erts-10.3.5.2] [source] [64-bit] [smp:8:8]
> >>> [ds:8:8:10] [async-threads:1] [hipe]
> >>>
> >>> Eshell V10.3.5.2  (abort with ^G)
> >>> (master@REDACTED)1>
> >>>
> >>>
> >>>
> >>> What is the proper way to deal with this situation?
> >>> I can see the master node in epmd names, I can connect to it, I
> >>> can pass interconnect protocol.
> >>> But I do not understand, why remsh doesn't connect to it.
> >>>
> >>>
> >>> _______________________________________________
> >>> erlang-questions mailing list
> >>> erlang-questions@REDACTED
> >>> http://erlang.org/mailman/listinfo/erlang-questions
> >>>
> >> _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
> >



-- 
Wir haften nicht für die korrekte Funktion der in dieser eMail
enthaltenen Viren. We are not liable for correct function of the
viruses in this email! :)



More information about the erlang-questions mailing list