namenode 没有运行...我已经尝试过 sudo chown -R username /usr/local/hadoop/ 请帮忙

namenode 没有运行...我已经尝试过 sudo chown -R username /usr/local/hadoop/ 请帮忙
$ /usr/local/hadoop/sbin/start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh 
Starting namenodes on [localhost] 
divyeshlad@localhost's password:  
localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-divyeshlad-namenode-divyeshlad-VirtualBox.out
localhost: chown: changing ownership of '/usr/local/hadoop/logs': Operation not permitted
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-divyeshlad-namenode-divyeshlad-VirtualBox.out: Permission denied
localhost: head: cannot open '/usr/local/hadoop/logs/hadoop-divyeshlad-namenode-divyeshlad-VirtualBox.out' for reading: No such file or directory
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-divyeshlad-namenode-divyeshlad-VirtualBox.out: Permission denied
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-divyeshlad-namenode-divyeshlad-VirtualBox.out: Permission denied

答案1

好吧,首先脚本告诉您它已被弃用,您应该使用脚本start-dfs.shstart-yarn.sh

divyeshlad其次,您以没有写权限的用户身份启动服务/usr/local/hadoop/logs

root因此,要么以或 的身份启动服务chown -R divyeshlad /usr/local/hadoop/logs
不确定后者是否可行,因为我不知道 Hadoop 是否需要root运行权限。

相关内容