我正在关注Michael
当我尝试启动hadoop **/usr/local/hadoop/bin/start-all.sh**
我收到以下错误
mkdir: cannot create directory ‘/usr/local/hadoop/libexec/../logs’: Permission denied
chown: cannot access ‘/usr/local/hadoop/libexec/../logs’: No such file or directory
starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-stratageeksadmin- namenode-stratageeksadmin-ubuntu.out
/usr/local/hadoop/bin/hadoop-daemon.sh: line 136: /usr/local/hadoop/libexec/../logs /hadoop-stratageeksadmin-namenode-stratageeksadmin-ubuntu.out: No such file or directory
head: cannot open ‘/usr/local/hadoop/libexec/../logs/hadoop-stratageeksadmin-namenode-stratageeksadmin-ubuntu.out’ for reading: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop/libexec/../logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop/libexec/../logs’: No such file or directory
localhost: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-stratageeksadmin-datanode-stratageeksadmin-ubuntu.out
localhost: /usr/local/hadoop/bin/hadoop-daemon.sh: line 136: /usr/local/hadoop/libexec/../logs/hadoop-stratageeksadmin-datanode-stratageeksadmin-ubuntu.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop/libexec/../logs/hadoop-stratageeksadmin-datanode-stratageeksadmin-ubuntu.out’ for reading: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop/libexec/../logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop/libexec/../logs’: No such file or directory
localhost: starting secondarynamenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-stratageeksadmin-secondarynamenode-stratageeksadmin-ubuntu.out
答案 0 :(得分:1)
在该教程中已经提到过:
确保将所有文件的所有者更改为hduser用户和hadoop组。
请在hadoop安装目录中触发以下命令。
例如,如果安装目录为/usr/local/hadoop
:
sudo chown -R hduser:hadoop hadoop