hadoop ERROR: Attempting to operate on hdfs namenode as root ERROR: but there is no HDFS_NAMENODE_US
2019-03-29 22:33
477 查看
[root@master ~]# start-dfs.sh
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 [master]
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文件,添加下列参数:
[code]#!/usr/bin/env bash HDFS_DATANODE_USER=root HADOOP_SECURE_DN_USER=hdfs HDFS_NAMENODE_USER=root HDFS_SECONDARYNAMENODE_USER=root
对于start-yarn.sh和stop-yarn.sh文件,添加下列参数:
[code]#!/usr/bin/env bash YARN_RESOURCEMANAGER_USER=root HADOOP_SECURE_DN_USER=yarn YARN_NODEMANAGER_USER=root
重新开始start...就可以了。
相关文章推荐
- hadoop平台报错:ATTEMPTING TO OPERATE ON HDFS NAMENODE AS ROOT(start-all.sh)启动失败解决方法
- hadoop重启时,hdfs关闭不了,no namenode to stop
- as报错 ******.is registered as a Git root, but no Git repositories were found there.
- org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException: No leas e on
- [ERROR] The goal you specified requires a project to execute but there is no POM in this directory
- IDEA *.is registered as a Git root, but no Git repositories were found there.
- hadoop错误ERROR namenode.NameNode (NameNode.javamain(1657)) - Failed to start namenode java.net.BindException:Port in use:host1:50070
- hadoop错误FATAL org.apache.hadoop.hdfs.server.namenode.NameNode Exception in namenode join java.io.IOException There appears to be a gap in the edit log
- There is no Action mapped for namespace / and action name toList.
- 启动HDFS之后一直处于安全模式org.apache.hadoop.hdfs.server.namenode.SafeModeException: Log not rolled. Name node is in safe mode.
- (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d
- (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.
- The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
- ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in doCheckpoint
- 启动hadoop报ERROR org.apache.hadoop.hdfs.server.namenode.FSImage: Failed to load image from FSImageFile
- Error: Running Homebrew as root is extremely dangerous and no longer supported.
- hadoop 关闭时报 no namenode/nodemanager/XXXX to stop
- The goal you specified requires a project to execute but there is no POM in this directory
- 重启Hadoop集群时no namenode to stop的异常
- hadoop错误java.io.IOException Failed to replace a bad datanode on the existing pipeline due to no more good datanodes being available to try