ROO用户下启动hadoop报以下错误:
root@debian:/opt/software/hadoop/hadoop-0.20.205.0/bin# ./start-all.sh
starting namenode, logging to /opt/software/hadoop/hadoop-0.20.205.0/libexec/../logs/hadoop-root-namenode-debian.out
Warning: $HADOOP_HOME is deprecated.
localhost: starting datanode, logging to /opt/software/hadoop/hadoop-0.20.205.0/libexec/../logs/hadoop-root-datanode-debian.out
localhost: Warning: $HADOOP_HOME is deprecated.
localhost:
localhost: Unrecognized option: -jvm
localhost: Could not create the Java virtual machine.
localhost: starting secondarynamenode, logging to /opt/software/hadoop/hadoop-0.20.205.0/libexec/../logs/hadoop-root-secondarynamenode-debian.out
localhost: Warning: $HADOOP_HOME is deprecated.
localhost:
starting jobtracker, logging to /opt/software/hadoop/hadoop-0.20.205.0/libexec/../logs/hadoop-root-jobtracker-debian.out
Warning: $HADOOP_HOME is deprecated.
localhost: starting tasktracker, logging to /opt/software/hadoop/hadoop-0.20.205.0/libexec/../logs/hadoop-root-tasktracker-debian.out
localhost: Warning: $HADOOP_HOME is deprecated.
localhost:
通过在网上查找,有个兄弟是这样处理的:
1.vim hadoop-0.20.205.0/bin/hadoop文件
2.找到如下脚本
if [[ $EUID -eq 0 ]]; then
HADOOP_OPTS="$HADOOP_OPTS -jvm server $HADOOP_DATANODE_OPTS"
else
HADOOP_OPTS="$HADOOP_OPTS -server $HADOOP_DATANODE_OPTS"
fi
把if条件中的改为
HADOOP_OPTS="$HADOOP_OPTS -server $HADOOP_DATANODE_OPTS"
3.然后再启动hadooop,正常启动
root@debian:/opt/software/hadoop/hadoop-0.20.205.0/bin# jps
10614 Jps
10295 SecondaryNameNode
10503 TaskTracker
10386 JobTracker
10175 DataNode
10055 NameNode
--转自