Thursday, August 2, 2012

Erlang: problems connecting to node

How did you start the nodes, did you use
erl -setcookie my_cookie

Sometimes it is common to write

erl -cookie my_cookie % wrong, use setcooke, not cookie

erl --setcookie my_cookie % wrong, use only 1 dash

erl -setcookie=my_cookie % wrong, do not use an equals sign

What does the shell think the cookie value is ?
Try
1> erlang:get_cookie().

Is the value returned the same as the value as you intended to use for the cookie ?  If not, check the common mistakes above.


net_adm:ping fails:
Did you specify the remote node name as an atom ?
e.g. try 'a@localhost' instead of a@localhost