2012-03-28 50 views
1

os是Mac os獅子。 如果命令是'erl -name aa''erl -name bb',則兩個節點之間的長名稱連接正常。erlang奴隸:開始/ 2連接拒絕

但是,如果使用從站:

([email protected])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測試是folows:

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) 
([email protected])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) 
([email protected])2> net_adm:ping('[email protected]'). 
pong 
([email protected])3> 
+0

您聲明:「兩個節點之間的長名稱連接正常」。你是怎麼嘗試的? – 2012-03-28 11:03:34

+0

我在前一篇文章中添加了長名稱測試。 – 2012-03-28 11:13:04

回答

2

默認情況下,當你通過啓動節點啓動/ 2,如下發生連接混淆錯誤slave API使用RSH連接。從doc閱讀:

「從節點開始在同一臺主機作爲主上繼承了掌握一定 環境的值,比如當前目錄和 的環境變量有什麼可以假定有關。 在另一主機上啓動從站時的環境,請閱讀rsh程序的 文檔。「

也許就是這個問題。你應該驗證主機上的RSH連接是否正常。到rsh程序的另一種可以在命令行啓動「ERL」命令時,可以指定:

erl -rsh ssh 

希望這會開車送你到正確的方向。我沒有運行獅子,所以我不知道。

+0

我試過這個方向。獅子操作似乎很困難。它的ssh不包含ssh-askpass。非常感謝你。 – 2012-03-29 01:49:04