4

设置 hadoop 1.0.3 版后出现此错误:

$bin/start-all.sh

Warning: $HADOOP_HOME is deprecated.

starting namenode, logging to /var/log/hadoop/daley/hadoop-daley-namenode-datapath3.cise.ufl.edu.out
localhost: starting datanode, logging to /var/log/hadoop/daley/hadoop-daley-datanode-datapath3.cise.ufl.edu.out
localhost: starting secondarynamenode, logging to /var/log/hadoop/daley/hadoop-daley-secondarynamenode-datapath3.cise.ufl.edu.out
localhost: Exception in thread "main" java.lang.IllegalArgumentException: Does not contain a valid host:port authority: file:///
localhost:  at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:162)
localhost:  at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:198)
localhost:  at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:228)
localhost:  at org.apache.hadoop.hdfs.server.namenode.NameNode.getServiceAddress(NameNode.java:222)
localhost:  at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:161    )
localhost:  at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:129)
localhost:  at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:567)
starting jobtracker, logging to /var/log/hadoop/daley/hadoop-daley-jobtracker-datapath3.cise.ufl.edu.out
localhost: starting tasktracker, logging to /var/log/hadoop/daley/hadoop-daley-tasktracker-datapath3.cise.ufl.edu.out

我从谷歌得到的唯一解决方案是设置 fs.default.name 我已经设置为 hdfs://localhost:9100

4

1 回答 1

0

从你提供的错误信息来看,问题可能是secondary namenode的端口被占用了,可能是被同一台机器上的另一个hadoop系统占用了。所以设置配置 fs.default.name 是一个好办法。另一种方法是杀死占用端口的进程,这可能会导致另一个服务崩溃。

于 2012-11-12T10:14:24.610 回答