nodes active/inactive, but why?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

nodes active/inactive, but why?

Alexandre Karpov
Hi all,

(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).

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):

([hidden email])1> node().

'[hidden email]'

Node 2 (started with erl -name yyz setcookie abc):

1> node().

nonode@nohost

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.

Thank you for your time!
Alex

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: nodes active/inactive, but why?

zxq9-2
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):*
>
> ([hidden email])1> node().
>
> '[hidden email]'
>
> Node 2 (started with *erl -name yyz setcookie abc):*
>
> 1> node().
>
> nonode@nohost
>
> 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@changa:~/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]).  
  {ok,<0.63.0>}
  ([hidden email])2> erlang:set_cookie(node(), 'abc').
  true
  ([hidden email])3>

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.

-Craig
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: nodes active/inactive, but why?

Vyacheslav Levytskyy-2
In reply to this post by Alexandre Karpov

Hi, you have an error around 'setcookie', prepend it with - pls:

erl -sname yyz -setcookie abc
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V9.0  (abort with ^G)
(yyz@brixia)1> node().
yyz@brixia
(yyz@brixia)2> erlang:get_cookie().
abc

Best regards,
Vyacheslav


On 01.10.2017 05:22, Alexandre Karpov wrote:
Hi all,

(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).

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):

([hidden email])1> node().

'[hidden email]'

Node 2 (started with erl -name yyz setcookie abc):

1> node().

nonode@nohost

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.

Thank you for your time!
Alex


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: nodes active/inactive, but why?

Alexandre Karpov
In reply to this post by Alexandre Karpov
Oh my. As usual, the problem had to be that trivial, eh. Thank you (and everyone else who responded).

On Sun, Oct 1, 2017 at 6:03 AM, bengt e <[hidden email]> wrote:
Greetings,

Is there a typo in the command 'erl -name little setcookie abc):' ? I that setcookie is a flag, ie -setcookie.

Also, after starting distributed Erlang you have epmd up and running. You can ask for other nodes 'epmd -names'


bengt

On Sun, Oct 1, 2017 at 5:22 AM, Alexandre Karpov <[hidden email]> wrote:
Hi all,

(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).

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):

([hidden email])1> node().

'[hidden email]'

Node 2 (started with erl -name yyz setcookie abc):

1> node().

nonode@nohost

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.

Thank you for your time!
Alex

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions




_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: nodes active/inactive, but why?

zxq9-2
On 2017年10月01日 日曜日 06:48:31 Alexandre Karpov wrote:
> Oh my. As usual, the problem had to be that trivial, eh. Thank you (and
> everyone else who responded).

Hah! But of course it was a missing dash. ;-)

-Craig
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions