2013-09-26 65 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