2013-01-31 39 views
7

我試圖在RAC上運行AWS EC2羣集中的並行分析。我正在使用 星羣來設置和管理EC2羣集,並試圖在R中使用snowforeach。首先,我在羣集中有2個節點,1個主節點和1個 worker。R和amazon EC2上的雪使用starcluster

starcluster start mycluster 
starcluster listinstances 

----------------------------------------- 
mycluster (security group: @sc-mycluster) 
----------------------------------------- 
.... 
Cluster nodes: 
    master running i-xxxxxxxxx masterIP.compute-1.amazonaws.com 
    node001 running i-xxxxxxxxx node001IP.compute-1.amazonaws.com 
Total nodes: 2 

starcluster sshmaster mycluster 

我然後啓動R和加載snow包,並嘗試創建集羣 對象。

R 
library("snow") 

cl = makeCluster(c("masterIP.compute-1.amazonaws.com", "node001IP.compute-1.amazonaws.com"), type = "SOCK") 

然而,這使我有以下錯誤信息:

The authenticity of host 'masterIP.compute-1.amazonaws.com (xx.xxx.xx.xx)' can't be established. 
ECDSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. 
Are you sure you want to continue connecting (yes/no)? yes 
Warning: Permanently added 'masterIP.compute-1.amazonaws.com,xx.xxx.xx.xx' (ECDSA) to the list of known hosts. 
Permission denied (publickey). 

所以,我想我的複製SSH密鑰(keyname.rsa要具體)到你的.ssh文件 在EC2上,並再次嘗試。這仍然沒有奏效;我收到了相同的 Permission denied (publickey).錯誤。這是我認爲starcluster 處理ssh和節點之間通信的設置,所以我有點爲 困惑,爲什麼我不能設置它。我也嘗試添加node001,所以cl = makeCluster(c("node001IP.compute-1.amazonaws.com"), type = "SOCK"),但是會發生相同的錯誤。

回答

2

事實證明,經過大量修補之後,所有需要的是對R 2.15版的更新。之後,命令cl = makeCluster(c("masterIP.compute-1.amazonaws.com", "node001IP.compute-1.amazonaws.com"), type = "SOCK")完美運作。