1

我们有一个具有三个节点的hadoop集群设置。当我们启动集群时,我们会收到一条错误消息,例如

ssh: Could not resolve hostname master:

但是在我们的应用程序中没有在配置中使用该名称。但是守护进程也都在主从中运行。但是在检查 UI 时,只有一个节点是活动节点。谁能帮我这些conf文件引用的地方。

4

2 回答 2

0

你写了conf/mastersandconf/slaves file吗?在您的 hadoop 文件夹中,执行以下操作:

echo localhost > conf/masters;
echo localhost > conf/slaves;

另外, In conf/core-site.xml,请确保您设置fs.default.name

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
  <property>
    <name>fs.default.name</name>
    <value>hdfs://127.0.0.1:9000</value>
  </property>
</configuration>

conf/mapred-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
  <property>
    <name>mapred.job.tracker</name>
    <value>localhost:9001</value>
  </property>

  <property>
    <name>dfs.datanode.socket.write.timeout</name>
    <value>0</value>
  </property>
</configuration>
于 2012-06-19T20:25:56.830 回答
0

可能是,您在文件 $HADOOP_HOME/conf/masters | 中写入了“master:”而不是“master”。$HADOOP_HOME/conf/slaves...

这是一个 dns 问题,在环境设置过程中会遇到很多 dns 问题。您可以使用 hadoop-dns-checker 工具找出问题...

于 2012-06-18T20:18:17.970 回答