ERROR: User defined in HDFS_DATANODE_SECURE_USER (yarn) does not exist. Aborting.

错误

在4台服务器上安装高可用的Hadoop时,启动DataNode一直报下列的错误:
在Google了半天,也没有找到原因真的是抓耳挠撒
下面是启动时的报错。

[root@node01 hadoop]# start-all.sh 
Starting namenodes on [node01 node02]
Starting datanodes
node02: ERROR: User defined in HDFS_DATANODE_SECURE_USER (yarn) does not exist. Aborting.
node03: ERROR: User defined in HDFS_DATANODE_SECURE_USER (yarn) does not exist. Aborting.
node04: ERROR: User defined in HDFS_DATANODE_SECURE_USER (yarn) does not exist. Aborting.
Starting journal nodes [node01 node02 node03]
2019-04-26 15:14:39,251 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting ZK Failover Controllers on NN hosts [node01 node02]
Starting resourcemanagers on [ node03 node04]
node04: WARNING: /opt/hadoop-3.1.2/logs does not exist. Creating.
Starting nodemanagers

解决方法:

  1. hadoop-env.sh里面的角色分配全部给注释掉
    #JAVA
    export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64
    # HDFS
    # export HDFS_NAMENODE_USER=root
    # export HDFS_DATANODE_USER=root
    # export HDFS_SECONDARYNAMENODE_USER=root
    # export HDFS_ZKFC_USER=root
    # export HDFS_JOURNALNODE_USER=root
    # export HADOOP_SECURE_DN_USER=hdfs
    # export HDFS_DATANODE_SECURE_USER=hdfs
    
    #YARN
    #export YARN_RESOURCEMANAGER_USER=root
    # export HADOOP_SECURE_DN_USER=yarn 
    #export HDFS_DATANODE_SECURE_USER=yarn
    #export YARN_NODEMANAGER_USER=root
    
    
  2. start-dfs.sh, stop-dfs.sh中添加入如下的内容
    #!/usr/bin/env bash
    
    HDFS_DATANODE_USER=root
    HDFS_DATANODE_SECURE_USER=hdfs
    HDFS_NAMENODE_USER=root
    HDFS_SECONDARYNAMENODE_USER=root
    
    # Licensed to the Apache Software Foundation (ASF) under one or more
    # contributor license agreements.  See the NOTICE file distributed with
    # this work for additional information regarding copyright ownership.
    # The ASF licenses this file to You under the Apache License, Version 2.0
    ...........
    
  3. start-yarn.sh, stop-yarn.sh中添加如下内容
    #!/usr/bin/env bash
    
    YARN_RESOURCEMANAGER_USER=root
    HDFS_DATANODE_SECURE_USER=yarn
    YARN_NODEMANAGER_USER=root
    
    # Licensed to the Apache Software Foundation (ASF) under one or more
    # contributor license agreements.  See the NOTICE file distributed with
    # this work for additional information regarding copyright ownership.
    # The ASF licenses this file to You under the Apache License, Version 2.0
    ............
    
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值