2

在安装 Hadoop 时,我遇到了很多错误,但这个错误并没有发生。无论我做什么,它都会一次又一次地弹出。一旦我通过命令启动 Hadoop ./start-all.sh,我就会收到错误消息:

本地主机:rajneeshsahai@localhost:权限被拒绝(公钥,密码,键盘交互)

错误日志:

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).

我已经尝试过以下事情:

  1. ssh-keygen -t rsa

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

    chmod 600 ~/.ssh/authorized_keys

    我认为重复这个过程会在我的系统中创建多个密钥。

  2. sudo passwd

  3. 已配置/etc/ssh/sshd_config

    (一)PermitRootLogin prohibit-password改为PermitRootLogin yes

    (ii)PasswordAuthentication no改为PasswordAuthentication yes

    我确实有一个疑问:我是否必须#从行中删除井号 ( )?

我正在使用 macOS Catalina。

4

2 回答 2

1

您可以尝试以下方法:

$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 0600 ~/.ssh/authorized_keys
于 2021-03-23T16:08:10.383 回答
0

在 Windows WSL2 Ubuntu 容器上,您必须重新启动 ssh 服务才能使其可用于 Hadoop。您可以尝试在 docker 容器中运行 Hadoop。请参阅https://github.com/big-data-europe/docker-hadoop

在 Ubuntu 20.04 容器中,每次启动 Hadoop 之前,我都会重新启动 ssh 服务。

sudo service ssh restart

有关更多详细信息,请参阅以下教程https://dev.to/samujjwaal/hadoop-installation-on-windows-10-using-wsl-2ck1

于 2021-03-24T10:10:48.140 回答