在Hadoop中启动单个节点群集时出现“权限被拒绝”错误


10

我正在Ubuntu 10.10中工作,正在尝试在Hadoop中启动单节点集群。

hadoop@abraham-Dimension-3000:/usr/local/hadoop$ bin/start-all.sh
mkdir: cannot create directory `/usr/local/hadoop/bin/../logs': Permission denied
starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-namenode-abraham-Dimension-3000.out
/usr/local/hadoop/bin/hadoop-daemon.sh: line 117: /usr/local/hadoop/bin/../logs/hadoop-hadoop-namenode-abraham-Dimension-3000.out: No such file or directory
head: cannot open `/usr/local/hadoop/bin/../logs/hadoop-hadoop-namenode-abraham-Dimension-3000.out' for reading: No such file or directory
localhost: mkdir: cannot create directory `/usr/local/hadoop/bin/../logs': Permission denied
localhost: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-datanode-abraham-Dimension-3000.out
localhost: /usr/local/hadoop/bin/hadoop-daemon.sh: line 117: /usr/local/hadoop/bin/../logs/hadoop-hadoop-datanode-abraham-Dimension-3000.out: No such file or directory
localhost: head: cannot open `/usr/local/hadoop/bin/../logs/hadoop-hadoop-datanode-abraham-Dimension-3000.out' for reading: No such file or directory
localhost: mkdir: cannot create directory `/usr/local/hadoop/bin/../logs': Permission denied
localhost: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-secondarynamenode-abraham-Dimension-3000.out
localhost: /usr/local/hadoop/bin/hadoop-daemon.sh: line 117: /usr/local/hadoop/bin/../logs/hadoop-hadoop-secondarynamenode-abraham-Dimension-3000.out: No such file or directory
localhost: head: cannot open `/usr/local/hadoop/bin/../logs/hadoop-hadoop-secondarynamenode-abraham-Dimension-3000.out' for reading: No such file or directory
mkdir: cannot create directory `/usr/local/hadoop/bin/../logs': Permission denied
starting jobtracker, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-jobtracker-abraham-Dimension-3000.out
/usr/local/hadoop/bin/hadoop-daemon.sh: line 117: /usr/local/hadoop/bin/../logs/hadoop-hadoop-jobtracker-abraham-Dimension-3000.out: No such file or directory
head: cannot open `/usr/local/hadoop/bin/../logs/hadoop-hadoop-jobtracker-abraham-Dimension-3000.out' for reading: No such file or directory
localhost: mkdir: cannot create directory `/usr/local/hadoop/bin/../logs': Permission denied
localhost: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-hadoop-tasktracker-abraham-Dimension-3000.out
localhost: /usr/local/hadoop/bin/hadoop-daemon.sh: line 117: /usr/local/hadoop/bin/../logs/hadoop-hadoop-tasktracker-abraham-Dimension-3000.out: No such file or directory
localhost: head: cannot open `/usr/local/hadoop/bin/../logs/hadoop-hadoop-tasktracker-abraham-Dimension-3000.out' for reading: No such file or directory
hadoop@abraham-Dimension-3000:/usr/local/hadoop$ 

我不知道我在做什么错或其中一些错误提示。

hadoop@abraham-Dimension-3000:/usr/local/hadoop$ jps
5099 Jps

任何人都可以诊断问题。

Answers:


21

错误提示权限问题。

确保hadoop用户具有的适当特权/usr/local/hadoop。尝试:

须藤chown -R hadoop / usr / local / hadoop /

我花了几个小时试图找出应该更改哪些设置才能使我的hadoop正常工作。最后,我找到了适合我的解决方案。谢谢!:)
jjankowiak 2015年

1

您使用hadoop用户以外的其他用户指定了hadoop文件系统的工作目录,因此请设置对hadoop用户具有读,写权限或更改目录的所有者的目录
Try ::

sudo chown -R hadoop-user /user/hadoop_project/

要么

sudo chmod 777 /user/hadoop_project

hadoop环境的“ hadoop用户”登录名。“ hadoop-project”为hadoop文件系统指定了工作目录。(指定用于hadoop安装的您自己的登录名和目录)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.