在使用 cloudera manager 安装 hdfs 的过程中,报错 using /usr/java/jdk1.7.0_67/ as JAVA_HOME using 5 as CDH_VERSION using /opt/cm-5.7.0/run/cloudera-scm-agent/process/25-hdfs-NAMENODE-createtmp as CONF_DIR using as SECURE_USER using as SECURE_GROUP unlimited Directory /tmp does not currently exist. Unable to create directory /tmp; see stderr log.
查看agent日志发现 Access denied for user root. Superuser privilege is required
此时你需要离开hdfs的安全模式
解决办法1.
ps -ef
ps -ef
看一下运行hdfs的用户是谁,再切到该用户下
root 11980 11954 0 14:27 ? 00:00:23 python2.6 /opt/cm-5.7.0/lib64/cmf/agent/build/env/bin/flood
postfix 12065 1078 0 14:29 ? 00:00:00 pickup -l -t fifo -u
root 14740 1 0 14:55 ? 00:00:00 sshd: root@pts/0
root 14765 14740 0 14:55 pts/0 00:00:00 -bash
root 15158 1 0 14:58 ? 00:00:00 /usr/sbin/sshd
hdfs 16493 11954 2 15:19 ? 00:00:29 /usr/java/jdk1.7.0_67//bin/java -Dproc_namenode -Xmx1000m -Dhdfs.audit.logg
hdfs 16523 11954 1 15:19 ? 00:00:14 /usr/java/jdk1.7.0_67//bin/java -Dproc_secondarynamenode -Xmx1000m -Dhdfs.a
root 19304 8259 1 15:43 pts/1 00:00:00 ps -ef
su - hdfs
再运行就ok了
hdfs dfsadmin -safemode leave
解决办法2
到服务器上修改hadoop的配置文件:conf/hdfs-core.xml, 找到 dfs.permissions 的配置项 , 将value值改为 false
在conf/hdfs-site.xml中加入
dfs.permissions
false
解决办法3
clouder manager 在web上操作流程:
1)增加角色:HDFS->配置->检查HDFS 权限dfs.permissions这项不要打勾->保存更改->重启hdfs
之后就可以用root用户
转载于:http://blog.sina.com.cn/s/blog_e699b42b0102xfnd.html