[erlang-questions] net_kernel:start oddity
David Welton
davidnwelton@REDACTED
Fri Feb 6 15:50:55 CET 2015
Node Foo
========
davidw@REDACTED:~ $ erl
Erlang/OTP 17 [erts-6.3] [source-f9282c6] [64-bit] [smp:4:4]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.3 (abort with ^G)
1> net_kernel:start([foo, longnames]).
{ok,<0.35.0>}
(foo@REDACTED)2> node().
'foo@REDACTED'
Node Bar
=======
davidw@REDACTED:~ $ erl
Erlang/OTP 17 [erts-6.3] [source-f9282c6] [64-bit] [smp:4:4]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.3 (abort with ^G)
1> net_kernel:start(['bar@REDACTED', longnames]).
{ok,<0.35.0>}
(bar@REDACTED)2> net_adm:ping('foo@REDACTED').
pang
*However*, this works:
Node Bar
=======
Eshell V6.3 (abort with ^G)
1> net_kernel:start([bar, longnames]).
{ok,<0.35.0>}
(bar@REDACTED)2> net_adm:ping('foo@REDACTED').
pong
I mean, it's the same node, right?
net_kernel:start(['bar@REDACTED', longnames]).
{ok,<0.45.0>}
(bar@REDACTED)6> N1 = node().
'bar@REDACTED'
(bar@REDACTED)7> net_kernel:stop().
ok
8> net_kernel:start([bar, longnames]).
{ok,<0.54.0>}
(bar@REDACTED)9> N2 = node().
'bar@REDACTED'
(bar@REDACTED)10> N1 == N2.
true
Any ideas what is going on?
--
David N. Welton
http://www.welton.it/davidw/
http://www.dedasys.com/
More information about the erlang-questions
mailing list