[erlang-questions] net_kernel:start oddity

David Welton davidnwelton@REDACTED
Fri Feb 6 23:27:40 CET 2015


Hi,

> I'm not sure about this, but I think that the problem is that the node names
> must be consistent in their use of node names with or without FQDN (in
> net_kernel:start). The recommended way is to always use it. If my memory
> serves me right, the issue is traceable to epmd, that saves the node name as
> received from net_kernel:start, and when you try to connect with a different
> name, it's not found.

If I do epmd -names, it just shows me:

name bar at port 51210
name foo at port 38616

Even though they're registered in different ways.

Still though, it does sound plausible.

> In short, always use a node name with a full FQDN when using long names.

What if you don't know the domain name ahead of time?  To me, it seems
like there is something behaving oddly.  If nothing else, perhaps some
additional documentation is needed.

http://erlang.org/doc/man/erl.html says that you use the FQDN with
-name, but it does work fine without it.

http://erlang.org/doc/man/net_kernel.html hints at the fact that the
atom you pass it should just be the node name sans the host part.
Perhaps that should be made more explicit in the documentation of the
start function.

Still though, I'm curious what's actually going on underneath to cause
the problem I'm seeing.

Thanks
-- 
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/



More information about the erlang-questions mailing list