Hadoop start-dfs.sh权限被拒绝为“ubuntu”用户

时间:2017-07-18 11:28:16

标签: ubuntu hadoop amazon-ec2 hdfs

我正在尝试在Amazon aws上设置4节点集群。 所有安装,设置和配置都已完成,但在执行“start-dfs.sh”命令时遇到问题。

以下是错误消息:

Starting namenodes on [ec2-13-126-215-231.ap-south-1.compute.amazonaws.com]
ec2-13-126-215-231.ap-south-1.compute.amazonaws.com: Permission denied (publickey).

datanode2: starting datanode, logging to /usr/local/hadoop/logs/hadoop-ubuntu-datanode-ip-172-31-30-218.out

datanode3: starting datanode, logging to /usr/local/hadoop/logs/hadoop-ubuntu-datanode-ip-172-31-18-165.out

datanode1: starting datanode, logging to /usr/local/hadoop/logs/hadoop-ubuntu-datanode-ip-172-31-19-66.out

Starting secondary namenodes [0.0.0.0]
0.0.0.0: Permission denied (publickey).

我也试过以下

sudo chown -R ubuntu /usr/local/hadoop
sudo chmod 777 /usr/local/hadoop

但仍面临同样的错误。

请帮我解决此错误。提前谢谢!

1 个答案:

答案 0 :(得分:0)

我认为您应该将chmod命令用于文件,而不是文件夹。例如:

sudo chmod 777 /usr/local/hadoop/start-dfs.sh

OR:

sudo chmod 777 -R /usr/local/hadoop/