$ /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
好吧,首先脚本告诉您它已被弃用,您应该使用脚本
start-dfs.sh
和start-yarn.sh
.其次,您以用户
divyeshlad
身份启动服务,该用户在/usr/local/hadoop/logs
.因此,要么以
root
或启动服务chown -R divyeshlad /usr/local/hadoop/logs
。不确定后者是否会起作用,因为我不知道 Hadoop 是否需要
root
运行权限。