美文网首页
hadoop安装报错:Permission denied (pu

hadoop安装报错:Permission denied (pu

作者: 你的努力时光不会辜负 | 来源:发表于2021-01-27 14:37 被阅读0次

    ==========================

    Creating target directory...

    ==========================

    Command start time 2021-01-27 11:17:58

    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

    SSH command execution finished

    host=drm001, exitcode=255

    Command end time 2021-01-27 11:17:59

    ERROR: Bootstrap of host drm001 fails because previous action finished with non-zero exit code (255)

    ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

    STDOUT:

    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

    解决办法:用户的互信有问题,需要做到server主机对自己互信,以及对agent互信。

    1、产生秘钥

    集群每台主机,切换到test用户,执行如下命令,产生SSH认证密钥对。

    ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa

    2、配置ssh无密登录

    将Ambari Server生成的公钥文件id_rsa.pub拷贝至集群其他Ambari Agent主机,并加入Ambari Agent的授权列表。

    Ambari

    server主机执行下面命令:

    cd ~/.ssh/

    ssh-copy-id-i ~/.ssh/id_rsa.pub -p端口 test@{target_host}

    //{target_host}包括hadoop集群的所有主机,可以是主机名或IP地址

    //该命令完成后会在{target.host}的~/.ssh/目录下生成文件authorized_keys

    * 注意需要对本机也需要实现免密登录,所以server主机也是需要authorized_keys

    3、设置目录权限

    chmod700 ~/.ssh

    chmod600 ~/.ssh/authorized_keys

    4、验证是否需要免密

    ssh -p22022 ip

    -p根据需要增加,非22的端口,可能需要

    相关文章

      网友评论

          本文标题:hadoop安装报错:Permission denied (pu

          本文链接:https://www.haomeiwen.com/subject/tlkazktx.html