Hadoop: start-dfs.sh permission denied

后端 未结 9 938
攒了一身酷
攒了一身酷 2020-12-13 14:04

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         


        
9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 14:51

    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:

    1. 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.cat /home/hadoop/.ssh/id_rsa.pub >> .ssh/authorized_keys (To copy the newly generated public key to auth file in your users home/.ssh directory)

    1. ssh localhost

    2. start-dfs.sh (Now it should work!)

提交回复
热议问题