dfs 访问拒绝_Hadoop:拒绝了start-dfs.sh权限

I am installing Hadoop on my laptop. SSH works fine, but I cannot start hadoop.

munichong@GrindPad:~$ ssh localhost

Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0-25-generic x86_64)

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

0 packages can be updated.

0 updates are security updates.

Last login: Mon Mar 4 00:01:36 2013 from localhost

munichong@GrindPad:~$ /usr/sbin/start-dfs.sh

chown: changing ownership of `/var/log/hadoop/root': Operation not permitted

starting namenode, logging to /var/log/hadoop/root/hadoop-munichong-namenode-GrindPad.out

/usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-munichong-namenode.pid: Permission denied

usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/root/hadoop-munichong-namenode-GrindPad.out: Permission denied

head: cannot open `/var/log/hadoop/root/hadoop-munichong-namenode-GrindPad.out' for reading: No such file or directory

localhost: chown: changing ownership of `/var/log/hadoop/root': Operation not permitted

localhost: starting datanode, logging to /var/log/hadoop/root/hadoop-munichong-datanode-GrindPad.out

localhost: /usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/root/hadoop-munichong-datanode-GrindPad.out: Permission denied

localhost: /usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-munichong-datanode.pid: Permission denied

localhost: head: cannot open `/var/log/hadoop/root/hadoop-munichong-datanode-GrindPad.out' for reading: No such file or directory

localhost: chown: changing ownership of `/var/log/hadoop/root': Operation not permitted

localhost: starting secondarynamenode, logging to /var/log/hadoop/root/hadoop-munichong-secondarynamenode-GrindPad.out

localhost: /usr/sbin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-munichong-secondarynamenode.pid: Permission denied

localhost: /usr/sbin/hadoop-daemon.sh: line 135: /var/log/hadoop/root/hadoop-munichong-secondarynamenode-GrindPad.out: Permission denied

localhost: head: cannot open `/var/log/hadoop/root/hadoop-munichong-secondarynamenode-GrindPad.out' for reading: No such file or directory

munichong@GrindPad:~$ sudo /usr/sbin/start-dfs.sh

[sudo] password for munichong:

starting namenode, logging to /var/log/hadoop/root/hadoop-root-namenode-GrindPad.out

localhost: Permission denied (publickey,password).

localhost: Permission denied (publickey,password).

I used "sudo". But the permission is still denied.

Is there anyone can help me?

Thanks in advance!

解决方案

I was stuck at the same issue for last couple of hours but finally solved it.

I had the hadoop installation extracted by same user as one I am using to run hadoop. So user privilege is not issue.

My cofiguration is like this:

Ubuntu linux machine on Google Cloud.

Hadoop installation /home/

Hadoop data directory /var/lib/hadoop

and the directory access bits are 777 so anybody can access.

I did ssh into the remote machine made changes to the config files and executed start-dfs.sh, then it gave me "Permission denied (Public key)"

So here is the solution:

In the same ssh terminal:

ssh-keygen

2.It will ask for folder location where it will copy the keys, I entered /home/hadoop/.ssh/id_rsa

3.it will ask for pass phrase, keep it empty for simplicity.

4.cp /home/hadoop/.ssh/id_rsa.pub .ssh/authorized_keys

(To copy the newly generated public key to auth file in your users home/.ssh directiry

ssh localhost

start-dfs.sh

(Now it should work!)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值