无法连接同一台机器上的两个节点:cookie 问题

Can't connect two nodes on same machine: cookie problem

谁能告诉我这是怎么可能的:

$ erl -sname n1 -setcoookie guitar
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.3  (abort with ^G)

(n1@My-MacBook-Pro-2)1> erlang:get_cookie().
'TUUSVNDBMEWLOXSGZUAO'

语法错误;您将 -setcookie 拼错为 -setcoookie,并多了一个 'o'。使用正确的拼写,你会得到想要的结果:

$ erl -sname n1 -setcookie guitar
...
(n1@host)1> erlang:get_cookie().
guitar