hadoop单节点群集错误

hgncfbus  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(319)

我遵循了从这个网站安装hadoop的每一个步骤https://www.digitalocean.com/community/tutorials/how-to-install-hadoop-on-ubuntu-13-10
所有的步骤都进行得很顺利,除了最后一步我开始使用hadoop start-dfs.sh 很多错误都会出现。请帮忙。错误包括:

15/04/07 00:08:16 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]

localhost: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied

localhost: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory

localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-tushar-namenode-tushar-VirtualBox.out

localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-tushar-namenode-tushar-VirtualBox.out: No such file or directory

localhost: head: cannot open ‘/usr/local/hadoop/logs/hadoop-tushar-namenode-tushar-VirtualBox.out’ for reading: No such file or directory

localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-tushar-namenode-tushar-VirtualBox.out: No such file or directory

localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-tushar-namenode-tushar-VirtualBox.out: No such file or directory

localhost: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied

localhost: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory

localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-tushar-datanode-tushar-VirtualBox.out

localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-tushar-datanode-tushar-VirtualBox.out: No such file or directory

localhost: head: cannot open ‘/usr/local/hadoop/logs/hadoop-tushar-datanode-tushar-VirtualBox.out’ for reading: No such file or directory

localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-tushar-datanode-tushar-VirtualBox.out: No such file or directory

localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-tushar-datanode-tushar-VirtualBox.out: No such file or directory

Starting secondary namenodes [0.0.0.0]

0.0.0.0: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied

0.0.0.0: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory

0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-tushar-secondarynamenode-tushar-VirtualBox.out

0.0.0.0: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-tushar-secondarynamenode-tushar-VirtualBox.out: No such file or directory

0.0.0.0: head: cannot open ‘/usr/local/hadoop/logs/hadoop-tushar-secondarynamenode-tushar-VirtualBox.out’ for reading: No such file or directory

0.0.0.0: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-tushar-secondarynamenode-tushar-VirtualBox.out: No such file or directory

0.0.0.0: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-tushar-secondarynamenode-tushar-VirtualBox.out: No such file or directory
15/04/07 00:08:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
nhn9ugyo

nhn9ugyo1#

您的用户帐户没有正确的权限访问 /usr/local/hadoop 目录,因此hadoop在尝试创建日志时失败。试着跑步 sudo chown -R <username> /usr/local/hadoop 你的用户名在哪里。要获取用户名,可以使用 whoami 命令。

相关问题