本帖最后由 pig2 于 2014-1-9 08:30 编辑
chaiying0@ubuntu:~$ /home/hadoop/hadoop-0.20.2/bin/start-all.sh
starting namenode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-namenode-ubuntu.out
/home/hadoop/hadoop-0.20.2/bin/hadoop-daemon.sh: line 117: /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-namenode-ubuntu.out: Permission denied
head: cannot open `/home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-namenode-ubuntu.out' for reading: No such file or directory
localhost: starting datanode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-datanode-ubuntu.out
localhost: /home/hadoop/hadoop-0.20.2/bin/hadoop-daemon.sh: line 117: /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-datanode-ubuntu.out: Permission denied
localhost: head: cannot open `/home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-datanode-ubuntu.out' for reading: No such file or directory
localhost: starting secondarynamenode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-secondarynamenode-ubuntu.out
localhost: /home/hadoop/hadoop-0.20.2/bin/hadoop-daemon.sh: line 117: /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-secondarynamenode-ubuntu.out: Permission denied
localhost: head: cannot open `/home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-secondarynamenode-ubuntu.out' for reading: No such file or directory
starting jobtracker, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-jobtracker-ubuntu.out
/home/hadoop/hadoop-0.20.2/bin/hadoop-daemon.sh: line 117: /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-jobtracker-ubuntu.out: Permission denied
head: cannot open `/home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-jobtracker-ubuntu.out' for reading: No such file or directory
localhost: starting tasktracker, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-tasktracker-ubuntu.out
localhost: /home/hadoop/hadoop-0.20.2/bin/hadoop-daemon.sh: line 117: /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-tasktracker-ubuntu.out: Permission denied
localhost: head: cannot open `/home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-chaiying0-tasktracker-ubuntu.out' for reading: No such file or directory
这里面有两个错误,一个是permission denied,另一个是no such file or director
解决办法:
1.no such file or director首先看一下,是否有这个文件,如果没有这属于一个低级错误。如果有的话,可以继续往下看。
2.大多数因为权限问题
当前用户没有打开 hadoop下的logs 文件。可以使用 ls -al 查看一下,logs文件的权限应该不属于当前用户需要使用 sudo chown chaiying0:chaiying0 logs 命令 来赋予当前用户 chaiying0权限。
chaiying0访问hadoop用户下的文件肯定是没有权限的
3.如果上面不行可以尝试格式化:hadoop namenode -format
hadoop namenode -format
格前先删除tmp下面的所有文件,(包括data节点)。
|
|