2013-09-26 66 views
0

我有三臺Ubuntu 12.04 LTS計算機,我想按照here所述在主/從配置上安裝Hadoop。它表示首先將Hadoop安裝爲單個節點,然後繼續進行多節點操作。單節點安裝工作得很好。我對/ etc/hosts文件進行了必要的更改,並按照指南的說明配置了所有內容,但是當我在主服務器上啓動Hadoop集羣時,出現錯誤。Ubuntu上的Hadoop多節點羣集安裝問題 - 疑難解答

我的電腦,正確地命名爲鐵人,超人和蝙蝠俠,蝙蝠俠(還有誰?)是主節點。當我做sudo bin/start-dfs.sh時,顯示如下。

enter image description here

當我輸入密碼,我得到這個:

enter image description here

當我嘗試sudo bin/start-all.sh,我得到這個:

enter image description here

我可以ssh到不同的終端,但有些東西不是qui正確。我檢查了超人/奴隸終端上的日誌,它說它無法連接到蝙蝠俠:54310和一些zzz消息。我想我的/ etc/hosts文件是錯誤的,但實際上,它是:

enter image description here

我試圖通過改變iptables來打開端口54310,但是這裏顯示的輸出畫面是在我所做的更改。我在智慧的結尾。請告訴我哪裏出錯了。如果您需要更多信息,請告訴我,我會相應更新問題。謝謝!

更新:這裏是我的conf文件。

core-site.xml請注意,我把蝙蝠俠:54310而不是IP地址。我只是改變了它,因爲我認爲我會更明確地使綁定。

<?xml version="1.0"?> 
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 

<!-- Put site-specific property overrides in this file. --> 

<configuration> 
<property> 
<name>hadoop.tmp.dir</name> 
<value>/app/hadoop/tmp</value> 
<description>A base for other temporary directories.</description> 
</property> 

<property> 
    <name>fs.default.name</name> 
    <value>hdfs://130.65.153.195:54310</value> 
    <description>The name of the default file system. A URI whose 
    scheme and authority determine the FileSystem implementation. The 
    uri's scheme determines the config property (fs.SCHEME.impl) naming 
    the FileSystem implementation class. The uri's authority is used to 
    determine the host, port, etc. for a filesystem.</description> 
</property> 

</configuration> 

mapred-site.xml中

<?xml version="1.0"?> 
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 

<!-- Put site-specific property overrides in this file. --> 

<configuration> 
<property> 
<name>mapred.job.tracker</name> 
<value>130.65.153.195:54311</value> 
<description>The host and port that the MapReduce job tracker runs 
at. If "local", then jobs are run in-process as a single map 
and reduce task. 
</description> 
</property> 

</configuration> 

HDFS-site.xml中

<?xml version="1.0"?> 
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 

<!-- Put site-specific property overrides in this file. --> 

<configuration> 
<property> 
<name>dfs.replication</name> 
<value>3</value> 
<description>Default block replication. 
The actual number of replications can be specified when the file is created. 
The default is used if replication is not specified in create time. 
</description> 
</property> 

</configuration> 

的conf /大師文件只是batman和我的conf /奴隸文件是隻是:

batman 
superman 
ironman 

希望這個澄清的東西。

+0

能否請您告訴我您的配置文件?[我寧願超人作爲主BTW ;-) ..爲什麼他們會接受另外一個作爲自己的主人...] – Tariq

+0

根據漫畫,蝙蝠俠擊敗超人所以他是主人! :P另外,如果你在YouTube上看到了它應如何已經結束了視頻,他是主..因爲他是蝙蝠俠!無論如何,我會與核心站點,HDFS站點和mapred站點文件不久更新的問題。謝謝! – CodingInCircles

+0

@Tariq:現在請看看這個問題。謝謝! – CodingInCircles

回答

1

首先要做的事情是:確保可以從主設備ping主設備,從主設備ping從設備。分別登錄到每臺機器並ping其他2臺主機。確保他們可以通過他們的主機名訪問。您可能沒有在從屬設備中添加/ etc/hosts條目。

其次,您需要設置無密碼SSH訪問。您可以使用此ssh-keygen -t rsassh-copy-id。這將有助於刪除密碼提示。爲此創建一個單獨的用戶(並且不使用root)是一個好主意。

如果這沒有幫助,請發表您的日誌輸出。

+0

我只是試圖做使用VirtualBox一樣,我意識到,我做了幾步錯誤。謝謝buzypi! :) – CodingInCircles