hadoop2.6.0 sudo sbin/start-dfs.sh 失败

hadoop2.6.0 sudo sbin/start-dfs.sh fail

我在我的机器上以伪分布式模式跟随 Hadoop official tutorial 到 运行 Hadoop。

我可以使用 ssh 无需密码登录本地主机:

admin@mycomputer:/usr/local/hadoop/hadoop-2.6.0$ ssh localhost 
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-45-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

4 packages can be updated.
0 updates are security updates.

Last login: Mon Feb  9 12:31:17 2015 from localhost
admin@mycomputer:~$

而且我也可以无误格式化namenode,但是我不能用start-dfs.sh:

启动Hadoop
admin@mycomputer:/usr/local/hadoop/hadoop-2.6.0$ sudo sbin/start-dfs.sh
Starting namenodes on [localhost]
root@localhost's password: 
localhost: Permission denied, please try again.

为什么我仍然被要求提供 root 密码,而我可以在没有它的情况下通过 ssh 进入本地主机?

我也试过:

sudo passwd

重设密码,后来又遇到同样的permission denied错误,看来这个密码不是root@localhost的密码。我该如何解决这个问题?

我认为您没有更改 hadoop-2.6.0 文件夹的权限。授予管理员用户对此文件夹的权限并尝试启动。

关注我的以下博客 link:我通过从另一个博客中丰富内容,在 Ubuntu 中提供了详细的安装步骤。

http://gubendran.blogspot.com/2015/01/install-hadoop-in-single-node-linux.html