distributed erlang failure reason

Fredrik Thulin ft@REDACTED
Thu Mar 16 10:05:20 CET 2006


Hi

How do I determine _why_ I could not connect to a remote node?

I want to make my command line utilities capable of informing the user 
that the reason they can't get status information from my running nodes 
is that they have the wrong cookie for example.

I tried

  (ctl@REDACTED)1> net_kernel:monitor_nodes(true, [nodedown_reason]).
  ok
  (ctl@REDACTED)2> erlang:set_cookie(node(), 'foo').
  true
  (ctl@REDACTED)3> net_kernel:connect_node('incomingproxy@REDACTED').
  false
  (ctl@REDACTED)4> flush().
  ok
  (ctl@REDACTED)5>  

but as you can see, no nodedown message was received, and the result of 
net_kernel:connect_node/1 was a simple 'false'.

Likewise, on the node 'incomingproxy@REDACTED', I had set up monitor_nodes 
and got nothing although I did get a

  =ERROR REPORT==== 16-Mar-2006::09:51:32 ===
	** Connection attempt from disallowed node 'ctl@REDACTED' **

printed on the console. Also, that error message does not contain enough 
detail as it makes no difference if the reason is the wrong cookie, or 
that the node was not in the list of allowed nodes set using 
net_kernel:allow/1.

/Fredrik



More information about the erlang-questions mailing list