今天早上我有Hadoop 2.4(参见我之前的2个问题)。现在我删除了它并安装了2.2,因为我遇到了2.4的问题,而且我认为2.2是最新的稳定版本。现在我在这里按照教程:
http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html?m=1
我很确定我做的一切都正确,但我再次面临类似的问题。
当我运行jps时,显然数据节点没有启动。
我又做错了什么?
非常感谢任何帮助。
hduser@test02:~$ start-dfs.sh
14/06/06 18:12:45 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
Starting namenodes on []
localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-hduser-namenode-test02.out
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-hduser-datanode-test02.out
localhost: Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
localhost: It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-test02.out
0.0.0.0: Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
0.0.0.0: It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
14/06/06 18:13:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
hduser@test02:~$ jps
2201 Jps
hduser@test02:~$ jps
2213 Jps
hduser@test02:~$ start-yarn
start-yarn: command not found
hduser@test02:~$ start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /usr/local/hadoop/logs/yarn-hduser-resourcemanager-test02.out
localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-hduser-nodemanager-test02.out
hduser@test02:~$ jps
2498 NodeManager
2264 ResourceManager
2766 Jps
hduser@test02:~$ jps
2784 Jps
2498 NodeManager
2264 ResourceManager
hduser@test02:~$ jps
2498 NodeManager
2264 ResourceManager
2796 Jps
hduser@test02:~$
答案 0 :(得分:1)
我的问题是我从字面上理解了教程中的这些说明。
在
<configuration>
之间粘贴以下内容 fs.default.name
HDFS://本地主机:9000
我怀疑这样做是错误的,但我仍然这样做
由于core-site.xml
文件是XML格式,因此似乎不正确
实际上,它需要看起来像这样。
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
将其更改为此修复了我的问题。
答案 1 :(得分:0)
我遇到类似DataNode无法启动的问题。我所做的是重新格式化namenode,然后重新启动集群。然后,运行jps
确认数据节点已启动。
这可能是因为将HDFS目录放在“home”目录(在Linux机器上),因为启动和关闭操作系统会影响这些文件夹(不确定如何,但是为了防止将来出现此问题) ,将HDFS目录移出主目录。)
如果有效,请告诉我。