[erlang-questions] net_kernel:start oddity

Vlad Dumitrescu vladdu55@REDACTED
Fri Feb 6 18:35:06 CET 2015


Hi David,

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.

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

If anyone knows better, please correct me.

best regards,
Vlad


On Fri, Feb 6, 2015 at 5:56 PM, David Welton <davidnwelton@REDACTED> wrote:

> I found net_kernel:verbose(10), which gives me, on the 'bad' node:
>
> (foo@REDACTED)10> net_kernel:connect_node('bar@REDACTED').
>
> =INFO REPORT==== 6-Feb-2015::17:43:41 ===
> {net_kernel,{connect,normal,'bar@REDACTED'}}
>
> =INFO REPORT==== 6-Feb-2015::17:43:41 ===
> {net_kernel,{'EXIT',<0.7660.0>,shutdown}}
>
> =INFO REPORT==== 6-Feb-2015::17:43:41 ===
> {net_kernel,{net_kernel,875,nodedown,'bar@REDACTED'}}
> false
>
> On the 'good' node, it works right away:
>
> (bar@REDACTED)7> net_kernel:connect_node('foo@REDACTED').
>
> =INFO REPORT==== 6-Feb-2015::17:55:43 ===
> {net_kernel,{connect,normal,'foo@REDACTED'}}
> true
>
> And after that, on the 'pang' node, I can connect to the other node as
> well...
> (foo@REDACTED)36> net_kernel:connect_node('bar@REDACTED').
>
> =INFO REPORT==== 6-Feb-2015::17:56:17 ===
> {net_kernel,{connect,normal,'bar@REDACTED'}}
> true
>
>
> --
> David N. Welton
>
> http://www.welton.it/davidw/
>
> http://www.dedasys.com/
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150206/5e2d6317/attachment.htm>


More information about the erlang-questions mailing list