erlang从机:启动/2连接被拒绝

erlang从机:启动/2连接被拒绝,erlang,Erlang,操作系统是MacOSLion。 如果命令是'erl-name aa'和'erl-name bb',则两个节点之间的longname连接正常 但如果使用slave:start/2,则会出现如下连接错误: (emacs@yus-iMac.local)33> slave:start('yus-iMac.local',bb). connect to address 192.168.64.1: Connection refused Trying 192.168.213.1... connect to

操作系统是MacOSLion。 如果命令是
'erl-name aa'
'erl-name bb'
,则两个节点之间的longname连接正常

但如果使用slave:start/2,则会出现如下连接错误:

(emacs@yus-iMac.local)33> slave:start('yus-iMac.local',bb).
connect to address 192.168.64.1: Connection refused
Trying 192.168.213.1...
connect to address 192.168.213.1: Connection refused
Trying 192.168.0.101...
connect to address 192.168.0.101: Connection refused
Trying fe80::654:53ff:fe0e:b2ee%en1...
connect to address fe80::654:53ff:fe0e:b2ee%en1: Connection refused
Trying 192.168.64.1...
connect to address 192.168.64.1: Connection refused
Trying 192.168.213.1...
connect to address 192.168.213.1: Connection refused
Trying 192.168.0.101...
connect to address 192.168.0.101: Connection refused
Trying fe80::654:53ff:fe0e:b2ee%en1...
connect to address fe80::654:53ff:fe0e:b2ee%en1: Connection refused
Trying 192.168.64.1...
connect to address 192.168.64.1: Connection refused
Trying 192.168.213.1...
connect to address 192.168.213.1: Connection refused
Trying 192.168.0.101...
connect to address 192.168.0.101: Connection refused
Trying fe80::654:53ff:fe0e:b2ee%en1...
connect to address fe80::654:53ff:fe0e:b2ee%en1: Connection refused
Trying 192.168.64.1...
connect to address 192.168.64.1: Connection refused
Trying 192.168.213.1...
connect to address 192.168.213.1: Connection refused
Trying 192.168.0.101...
connect to address 192.168.0.101: Connection refused
Trying fe80::654:53ff:fe0e:b2ee%en1...
connect to address fe80::654:53ff:fe0e:b2ee%en1: Connection refused
Trying 192.168.64.1...
connect to address 192.168.64.1: Connection refused
Trying 192.168.213.1...
connect to address 192.168.213.1: Connection refused
Trying 192.168.0.101...
connect to address 192.168.0.101: Connection refused
Trying fe80::654:53ff:fe0e:b2ee%en1...
connect to address fe80::654:53ff:fe0e:b2ee%en1: Connection refused
Trying 192.168.64.1...
connect to address 192.168.64.1: Connection refused
Trying 192.168.213.1...
connect to address 192.168.213.1: Connection refused
Trying 192.168.0.101...
connect to address 192.168.0.101: Connection refused
Trying fe80::654:53ff:fe0e:b2ee%en1...
yus-imac.local: Connection refused
{error,timeout}
longname测试如下所示:

yus-iMac:~ yuchen$ erl -name cc
Erlang R15B (erts-5.9) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9  (abort with ^G)
(cc@yus-iMac.local)1> 

yus-iMac:~ yuchen$ erl -name dd
Erlang R15B (erts-5.9) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9  (abort with ^G)
(dd@yus-iMac.local)2> net_adm:ping('cc@yus-iMac.local').
pong
(dd@yus-iMac.local)3> 

默认情况下,当您通过
slave
API启动节点时,将使用RSH连接。阅读下列文件:

“与主节点在同一主机上启动的从属节点继承某些 主目录中的环境值,例如当前目录和 环境变量。关于 环境当从机在另一台主机上启动时,请阅读 rsh计划的文件。”

也许这就是问题所在。您应该验证主机上的RSH连接是否正常。启动“erl”命令时,可以在命令行上指定rsh程序的替代方案:

erl -rsh ssh

希望这能把你带向正确的方向。我没有运行Lion,所以我真的不知道。

您声明:“两个节点之间的longname连接正常”。你是如何尝试的?我在上一篇文章中添加了长名称测试。我尝试了这个方向。这对狮子座的人来说似乎很难。它的ssh不包含ssh askpass。非常感谢你。