[erlang-questions] nodes active/inactive, but why?

zxq9 zxq9@REDACTED
Sun Oct 1 06:18:50 CEST 2017

Hi, Alexandre!

On 2017年09月30日 土曜日 23:22:30 Alexandre Karpov wrote:
> (Forgive me if this mailing list is not a best place for newbie question
> y'all seem to be way above that level, based on what I've seen in the last
> couple days).

Don't worry!

You've got a question about Erlang. You've come to the right place.

> Working through Joe's book, I've got to the exciting bits in "Distributed
> Programming" (chapter 14), which has examples for setting up rpc calls
> between nodes on the same machine (trivial) and different machines (not as
> trivial). I've got two boxes up for this exercise, got Erlang installed,
> and set up my DNS - I can ping both. But one of them acts like an "inactive
> node", so I don't think my setup is ready for playing:
> Node 1 (started with: *erl -name little setcookie abc):*
> (little@REDACTED)1> node().
> 'little@REDACTED'
> Node 2 (started with *erl -name yyz setcookie abc):*
> 1> node().
> nonode@REDACTED
> Um... what did I do wrong? running 'hostname' gives expected results:
> yyz.alexakarpov.xyz and little.alexakarpov.xyz respectively, and they're
> started the same way... both are running same Erlang versions, of course.

I'm not sure from this what went wrong. Try doing it manually from within
each node node to see what is going on:

  ceverett@REDACTED:~/vcs/zomp/src$ erl
  Erlang/OTP 20 [RELEASE CANDIDATE 2] [erts-9.0] [source] [64-bit] [smp:4:4] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:false]

  Eshell V9.0  (abort with ^G)
  1> net_kernel:start([foo]).   
  (foo@REDACTED)2> erlang:set_cookie(node(), 'abc').

Give that a shot and see what happens. Maybe you can start finding a new
direction to troubleshoot.

I don't use disterl very often, actually, so I'm not familiar with what
might be going on here with epmd and net_kernel. I usually use node names
to enforce that only a single instance of a program is running on a client
system, and occasionally that they can talk on the same system... which
isn't really what epmd is for.


More information about the erlang-questions mailing list