gpt4 book ai didi

"hadoop"用户的 Hadoop 启动 dfs 权限被拒绝

转载 作者:可可西里 更新时间:2023-11-01 14:26:08 28 4
gpt4 key购买 nike

我在 mac 本地 mac 上安装了 hadoop。当我使用单独的 hadoop 用户使用 start-dfs.sh 命令启动 dfs 时,我在终端中收到以下错误。

0.0.0.0: mkdir:/usr/local/Cellar/hadoop/2.3.0/libexec/logs: 权限被拒绝

有谁知道如何更改 hadoop 的日志目录?我使用 Homebrew 软件安装了 hadoop。

bash-3.2$ start-dfs.sh  
14/03/31 09:04:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: mkdir: /usr/local/Cellar/hadoop/2.3.0/libexec/logs: Permission denied
localhost: chown: /usr/local/Cellar/hadoop/2.3.0/libexec/logs: No such file or directory
localhost: starting namenode, logging to /usr/local/Cellar/hadoop/2.3.0/libexec/logs/hadoop-hadoop-namenode-mymac.local.out
localhost: /usr/local/Cellar/hadoop/2.3.0/libexec/sbin/hadoop-daemon.sh: line 151: /usr/local/Cellar/hadoop/2.3.0/libexec/logs/hadoop-hadoop-namenode-mymac.local.out: No such file or directory
localhost: head: /usr/local/Cellar/hadoop/2.3.0/libexec/logs/hadoop-hadoop-namenode-mymac.local.out: No such file or directory
localhost: /usr/local/Cellar/hadoop/2.3.0/libexec/sbin/hadoop-daemon.sh: line 166: /usr/local/Cellar/hadoop/2.3.0/libexec/logs/hadoop-hadoop-namenode-mymac.local.out: No such file or directory
localhost: /usr/local/Cellar/hadoop/2.3.0/libexec/sbin/hadoop-daemon.sh: line 167: /usr/local/Cellar/hadoop/2.3.0/libexec/logs/hadoop-hadoop-namenode-mymac.local.out: No such file or directory
localhost: mkdir: /usr/local/Cellar/hadoop/2.3.0/libexec/logs: Permission denied
localhost: chown: /usr/local/Cellar/hadoop/2.3.0/libexec/logs: No such file or directory

最佳答案

该错误表明存在权限问题。 hadoop 用户需要 hadoop 文件夹的适当权限。尝试在终端中运行以下命令:

sudo chown -R hadoop /usr/local/Cellar/hadoop/2.3.0/

关于 "hadoop"用户的 Hadoop 启动 dfs 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22766636/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com