无法启动CDH4辅助名称节点:NameNode地址的URI无效 [英] Unable to start CDH4 secondary name node: Invalid URI for NameNode address
问题描述
我一直在尝试设置hadoop的CDH4安装。我有12台机器,标有hadoop01 - hadoop12,名称节点,作业跟踪器,所有数据节点都已正常启动。我可以查看dfshealth.jsp并查看它是否找到了所有的数据节点。
I've been trying to setup a CDH4 installation of hadoop. I have 12 machines, labled hadoop01 - hadoop12, and the namenode, job tracker, and all data nodes have started fine. I'm able to view dfshealth.jsp and see that it's found all the data nodes.
但是,每当我尝试启动辅助名称节点时,它都会发出异常:
However, whenever I try to start the secondary name node it gives an exception:
Starting Hadoop secondarynamenode: [ OK ]
starting secondarynamenode, logging to /var/log/hadoop-hdfs/hadoop-hdfs-secondarynamenode-hadoop02.dev.terapeak.com.out
Exception in thread "main" java.lang.IllegalArgumentException: Invalid URI for NameNode address (check fs.defaultFS): file:/// has no authority.
at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:324)
at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:312)
at org.apache.hadoop.hdfs.server.namenode.NameNode.getServiceAddress(NameNode.java:305)
at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:222)
at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:186)
at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:578)
这是我的hdfs站点辅助名称节点上的.xml文件:
This is my hdfs-site.xml file on the secondary name node:
<configuration>
<property>
<name>dfs.name.dir</name>
<value>/data/1/dfs/nn</value>
</property>
<property>
<name>dfs.namenode.http-address</name>
<value>10.100.20.168:50070</value>
<description>
The address and the base port on which the dfs NameNode Web UI will listen.
If the port is 0, the server will start on a free port.
</description>
</property>
<property>
<name>dfs.namenode.checkpoint.check.period</name>
<value>3600</value>
</property>
<property>
<name>dfs.namenode.checkpoint.txns</name>
<value>40000</value>
</property>
<property>
<name>dfs.namenode.checkpoint.dir</name>
<value>/var/lib/hadoop-hdfs/cache</value>
</property>
<property>
<name>dfs.namenode.checkpoint.edits.dir</name>
<value>/var/lib/hadoop-hdfs/cache</value>
</property>
<property>
<name>dfs.namenode.num.checkpoints.retained</name>
<value>1</value>
</property>
<property>
<name>mapreduce.jobtracker.restart.recover</name>
<value>true</value>
</property>
</configuration>
给dfs.namenode.http-address赋值看起来有点不对,但我不知道是什么。它应该从http://还是hdfs://开始?我试着在lynx中调用10.100.20.168:50070,并显示一个页面。任何想法?
It would seem like something is wrong with the value given to dfs.namenode.http-address, but I'm not sure what. Should it start with http:// or hdfs://? I tried calling 10.100.20.168:50070 in lynx and it displayed a page. Any ideas?
推荐答案
看起来我缺少辅助名称节点上的core-site.xml配置。
Looks like I was missing the core-site.xml configuration on the secondary name node. Added that and the process started properly.
core-site.xml:
core-site.xml:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://10.100.20.168/</value>
</property>
</configuration>
这篇关于无法启动CDH4辅助名称节点:NameNode地址的URI无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!