简体   繁体   中英

Hadoop : Permission denied (publickey,password, keyboard-interactive)

While installing Hadoop I got many errors but this one just doesn't go. No matter what I do, it keeps popping again and again. As soon as I am starting Hadoop by the command ./start-all.sh , I get the error:

localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive)

Error logs:

Starting namenodes on [localhost]
localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive).

Starting datanodes
localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive).

Starting secondary namenodes [MacBook-Air.local]
MacBook-Air.local: rajneeshsahai@macbook-air.local: Permission denied (publickey,password,keyboard-interactive).

2020-05-29 18:42:06,106 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

Starting resourcemanager
resourcemanager is running as process 2937.  Stop it first.

Starting nodemanagers
localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive).

I already tried the following things:

  1. ssh-keygen -t rsa

    cat ~/.ssh/id-rsa.pub >> ~/.ssh/authorized_keys

    chmod 600 ~/.ssh/authorized_keys

    I think repeating this process has created multiple keys in my system.

  2. sudo passwd

  3. Configured /etc/ssh/sshd_config

    (i) Changed PermitRootLogin prohibit-password to PermitRootLogin yes

    (ii) Changed PasswordAuthentication no to PasswordAuthentication yes

    I do have one doubt: Do I have to remove the hash tag ( # ) from the lines?

I am using macOS Catalina.

You can try the following:

$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 0600 ~/.ssh/authorized_keys

On Windows WSL2 Ubuntu container you have to restart the ssh service to make it available for Hadoop. You could try to run the Hadoop in a docker container. See https://github.com/big-data-europe/docker-hadoop .

In the Ubuntu 20.04 container each time before I start Hadoop I restart the ssh service.

sudo service ssh restart

For more details see the following tutorial https://dev.to/samujjwaal/hadoop-installation-on-windows-10-using-wsl-2ck1 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM