Hadoop sbin/start-dfs.sh 权限被拒绝

时间:2021-04-18 12:26:57

标签: ubuntu hadoop ssh

我正在尝试在我的 Ubuntu (20.04) 机器上运行 Hadoop(我已经尝试了 3.2.2 和 3.3.0 版本),根据 Apaches 自己的文档中的“伪分布式操作”章节 {{ 3}} 但是当执行以下命令时:

sbin/start-dfs.sh

我知道答案

Starting namenodes on [localhost]
pdsh@my-computer: localhost: rcmd: socket: Permission denied
Starting datanodes
pdsh@my-computer: localhost: rcmd: socket: Permission denied
Starting secondary namenodes [my-computer]
pdsh@my-computer: my-computer: rcmd: socket: Permission denied

现在我知道还有其他关于这个问题的 SO-Questions,但似乎没有一个答案适合这里:

  • 按照 https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html 的建议,我创建并添加了一个 RSA 密钥,以便无需密码即可访问 ssh localhost。它工作正常!我可以运行 ssh localhost 并且它会在不询问我的密码的情况下启动一个 shell。
  • 按照 here 的建议,我创建了文件夹 /usr/local/hadoop/logs 并将其设为 777 可访问。
  • 按照 here 的建议,我已经检查了文件夹权限并确保我的 hadoop 文件夹的每个部分都具有 755 权限并且归用户所有,而不是 root
  • 按照 here 的建议,我已确保可以访问我的 RSA 密钥。
  • 按照 here 的建议,我通过编辑 ssh root@localhost 使 /etc/ssh/sshd_config 成为可能,这样 PermitRootLogin 不再被注释掉并且值为 yes。现在我可以运行 ssh root@localhost

所有这些建议都没有改变与上述问题有关的任何内容。

0 个答案:

没有答案