【问题标题】:Hadoop 2.6.0 - Asking password for the user while running the start up script?Hadoop 2.6.0 - 在运行启动脚本时询问用户密码?
【发布时间】:2017-03-25 04:10:31
【问题描述】:

我在 ubuntu linux 中以伪分布式模式安装了 hadoop 2.6.0。除了这个问题,一切都很好。当我运行 start-dfs.sh 脚本来启动守护进程时,它要求输入 linux 用户密码。不知道为什么?它要求为每个守护进程(namenode、datanode 和 sec namenode)输入密码。您能帮忙解决这个问题吗?

huser@ubuntu:~/hadoop$ sbin/start-dfs.sh
Starting namenodes on [localhost]
huser@localhost's password:

提前致谢。

【问题讨论】:

  • 这是你的用户的密码,你登录的用户!
  • 我不想输入密码。如何摆脱它?

标签: hadoop hadoop2


【解决方案1】:

如果您没有为 huser@localhost 设置 passwordless ssh,则会发生这种情况。搞定

如果您设置了passwordless ssh,请确保使用$sestatus 命令禁用selinux

注意:您应该以sudo 用户身份运行sestatus

【讨论】:

    【解决方案2】:

    在 Ubuntu 中,您可以使用以下一次性设置步骤来消除运行 hadoop 命令时输入密码的需要,例如 start-dfs.sh、start-yarn.sh:

    sudo apt-get install openssh-server openssh-client
    ssh-keygen -t rsa
    ssh-copy-id user@localhost
    

    用您的用户名替换用户。在 Ubuntu 16.04.2、hadoop-2.7.3、jdk1.8.0_121 上测试过

    注意: 1. 执行“ssh-keygen -t rsa”命令时,只需按三下即可接受默认值。 2. 执行“ssh-copy-id user@localhost”命令时,“确定要继续连接(是/否)吗?”输入“是”,然后输入您的密码

    也可以查看question

    【讨论】:

      猜你喜欢
      • 2018-06-29
      • 2015-04-02
      • 1970-01-01
      • 1970-01-01
      • 2019-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多