start.dfs.sh期间的异常

时间:2011-06-15 04:21:32

标签: java hadoop

我使用hadoop设置了一个双节点集群。

当我运行start-dfs.sh时出现此错误:

starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-namenode-mohit-ubuntu.out
slave: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-datanode-balaji-ubuntu.out
slave: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
slave: Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformName
slave: at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
slave: at java.security.AccessController.doPrivileged(Native Method)
slave: at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
slave: at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
slave: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
slave: at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
slave: Could not find the main class: org.apache.hadoop.util.PlatformName. Program will exit.
slave: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/hadoop/hdfs/server/datanode/DataNode
master: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-datanode-mohit-ubuntu.out
master: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-secondarynamenode-mohit-ubuntu.out

收到此错误后,我将HADOOP_CLASSPATH更改为export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:$HADOOP_HOME/lib/commons*.jar:$HADOOP_HOME:$HADDOP_HOME/hadoop-core-0.20.203.0.jar:$HADOOP_HOME/conf

但它没有帮助。

2 个答案:

答案 0 :(得分:0)

看起来似乎从属节点上不存在jar文件。奴隶的安装或配置是否不正确。

答案 1 :(得分:0)

或者您可以在我解释它的地方查找我的博客。还发布您的配置文件,以便我们可以调试它们。 http://blog.abhinavmathur.net/2013/01/adding-more-nodes-to-hadoop-cluster.html