1. 程式人生 > >使用root配置的hadoop並啟動會出現報錯

使用root配置的hadoop並啟動會出現報錯

1、使用root配置的hadoop並啟動會出現報錯 錯誤:         Starting namenodes on [master]         ERROR: Attempting to operate on hdfs namenode as root
       
        ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation.
       
        Starting datanodes         ERROR: Attempting to operate on hdfs datanode as root
       
        ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.         Starting secondary namenodes [slave1]         ERROR: Attempting to operate on hdfs secondarynamenode as root         ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation. 解決方法:          在/hadoop/sbin路徑下:
         將start-dfs.sh,stop-dfs.sh兩個檔案頂部新增以下引數
              HDFS_DATANODE_USER=root
              HADOOP_SECURE_DN_USER=hdfs
              HDFS_NAMENODE_USER=root
              HDFS_SECONDARYNAMENODE_USER=root
         start-yarn.sh,stop-yarn.sh頂部也需新增以下
            YARN_RESOURCEMANAGER_USER=root
            HADOOP_SECURE_DN_USER=yarn
            YARN_NODEMANAGER_USER=root 2、新增1後出現以下錯誤 WARNING: HADOOP_SECURE_DN_USER has been replaced by HDFS_DATANODE_SECURE_USER. Using value of HADOOP_SECURE_DN_USER.
Starting namenodes on [mylinux_1]
mylinux_1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Starting datanodes
localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Starting secondary namenodes [mylinux_1]
mylinux_1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
2018-11-26 09:32:18,082 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
Starting nodemanagers
localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). 解決辦法:配置免密登入(注意:對本機也需要配置) ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.pub
[email protected]
_1