I am trying to format namenode in hdfs but says: permission denied

时间:2015-07-31 19:36:56

标签: java hadoop hdfs permission-denied

I am trying to format namenode . For this I have tried.

hduser@Ubuntu:/usr/hadoop/hadoop-2.7.1$ bin/hdfs namenode -format

It says:

bin/hdfs: line 304: /root/software/jdk1.8.0_45/bin/java: Permission denied
bin/hdfs: line 304: exec: /root/software/jdk1.8.0_45/bin/java: cannot execute: Permission denied

1 个答案:

答案 0 :(得分:1)

所以,你有一个奇怪的安装。看起来您正在尝试引用安装到/ root的JDK安装(这是非常不寻常的)。您正在获得权限被拒绝,因为您尝试将命令作为非特权运行,这取决于您的用户无法访问的JDK安装。

以root身份运行可能会使此错误消失,但您可能需要重新考虑非正统安装。