2

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.

Muhammad Dyas Yaskur
  • 6,914
  • 10
  • 48
  • 73
  • Welcome to Stack Overflow! Hash (`#`) at the start of a line is a comment. So anything you modify on such line will have no effect. You need to uncomment it. You will also have to restart the `SSH` daemon. See this link: https://www.cyberciti.biz/faq/howto-change-ssh-port-on-linux-or-unix-server/ – Technext May 29 '20 at 14:02

2 Answers2

2

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
Marco Ancona
  • 2,073
  • 3
  • 22
  • 37
0

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.

Maxim
  • 11
  • 2