hadoop命令报错:权限问题

root用户执行hadoop命令报错:

[[email protected] conf]# hadoop fs -ls /user/
[INFO] 17:50:42 main [RetryInvocationHandler]Exception while invoking getFileInfo of class ClientNamenodeProtocolTranslatorPB over vmocdp127.test.com/172.16.145.127:8020. Trying to fail over immediately.144
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
	at org.apache.hadoop.hdfs.server.namenode.ha.StandbyState.checkOperation(StandbyState.java:87)
	at org.apache.hadoop.hdfs.server.namenode.NameNode$NameNodeHAContext.checkOperation(NameNode.java:1932)
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkOperation(FSNamesystem.java:1313)
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:3861)
	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getFileInfo(NameNodeRpcServer.java:1076)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getFileInfo(ClientNamenodeProtocolServerSideTranslatorPB.java:843)
	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2151)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2147)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2145)

	at org.apache.hadoop.ipc.Client.call(Client.java:1427)
	at org.apache.hadoop.ipc.Client.call(Client.java:1358)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)
	at com.sun.proxy.$Proxy9.getFileInfo(Unknown Source)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:771)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:252)
	at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:104)
	at com.sun.proxy.$Proxy10.getFileInfo(Unknown Source)
	at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2116)
	at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1315)
	at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1311)
	at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
	at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1311)
	at org.apache.hadoop.fs.Globber.getFileStatus(Globber.java:57)
	at org.apache.hadoop.fs.Globber.glob(Globber.java:252)
	at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:1655)
	at org.apache.hadoop.fs.shell.PathData.expandAsGlob(PathData.java:326)
	at org.apache.hadoop.fs.shell.Command.expandArgument(Command.java:235)
	at org.apache.hadoop.fs.shell.Command.expandArguments(Command.java:218)
	at org.apache.hadoop.fs.shell.Command.processRawArguments(Command.java:201)
	at org.apache.hadoop.fs.shell.Command.run(Command.java:165)
	at org.apache.hadoop.fs.FsShell.run(FsShell.java:287)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
	at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)
Found 6 items
drwxrwx---   - ambari-qa hdfs          0 2016-09-14 19:48 /user/ambari-qa
drwxr-xr-x   - hcat      hdfs          0 2016-09-14 20:09 /user/hcat
drwx------   - hdfs      hdfs          0 2016-09-20 18:51 /user/hdfs
drwxr-xr-x   - hive      hdfs          0 2016-09-14 20:11 /user/hive
drwxr-xr-x   - hdfs      hdfs          0 2016-09-20 18:49 /user/ocetl
drwxrwxr-x   - spark     hdfs          0 2016-09-14 20:00 /user/spark

 换成hdfs执行命令即可:sudo -u hdfs hadoop fs -ls /user

[[email protected] conf]# sudo -u hdfs hadoop fs -ls /user
Found 6 items
drwxrwx---   - ambari-qa hdfs          0 2016-09-14 19:48 /user/ambari-qa
drwxr-xr-x   - hcat      hdfs          0 2016-09-14 20:09 /user/hcat
drwx------   - hdfs      hdfs          0 2016-09-20 18:51 /user/hdfs
drwxr-xr-x   - hive      hdfs          0 2016-09-14 20:11 /user/hive
drwxr-xr-x   - hdfs      hdfs          0 2016-09-20 18:49 /user/ocetl
drwxrwxr-x   - spark     hdfs          0 2016-09-14 20:00 /user/spark

  

时间: 2024-12-14 08:37:00

hadoop命令报错:权限问题的相关文章

hadoop安装报错

安装hadoop HA的时候,格式化ZK,执行hdfs zkfc –formatZK命令 报错如下: 16/09/08 20:41:53 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=>hddata1:2181,hddata2:2181,hddata3:2181 sessionTimeout=5000 watcher[email protected]5dd308e3 16/09/08 20:41:53

输入pip命令报错:from pip import main ImportError: cannot import name 'main'

报错信息: [email protected]:~$ pip Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> from pip import main ImportError: cannot import name 'main' 很多博文的解决方案是,可能他们执行这命令有效果,我这ubuntu是不管怎么升级都只能是pip的8版本,也没找到如何pip的10版本设为默认版本,

用java运行Hadoop程序报错:org.apache.hadoop.fs.LocalFileSystem cannot be cast to org.apache.

用java运行Hadoop例程报错:org.apache.hadoop.fs.LocalFileSystem cannot be cast to org.apache.所写代码如下: package com.pcitc.hadoop; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.h

记hbase list 命令报错zookeeper连接失败

hbase list 命令报错:zookeeper exists failed after 4 attempts $telnet h0082161 2181 Connected to 172.16.82.161.Escape character is '^]'. telnet connect by close foreign. 此时发现telnet h0082161 其他端口均正常,其他机器telnet h0082161 2181正常, 此时进入一个误区,一直在围绕telnet 服务查看,查看/

CURL命令报错:dyld: lazy symbol binding failed: Symbol not found: _SSL_load_error_strings解决办法

Mac OS X 10.11.6, curl 命令报错,错误如下: dyld: lazy symbol binding failed: Symbol not found: _SSL_load_error_strings Referenced from: /usr/local/lib/libcurl.4.dylib Expected in: flat namespace dyld: Symbol not found: _SSL_load_error_strings Referenced from:

windows下使用GNU make命令报错的解决方法

windows下使用GNU make命令报错的解决方法=> 错误信息:make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3) ## 1.原因环境变量中配置了`D:\Program Files (x86)\Git\bin`,该目录下存在一个`sh.exe` 在执行make命令时,如果在`MakeFile`文件中没有指定shell的路径,`make`就会到环境变量中,去找一个`X:\\XXX\XXX\sh.exe`作

执行 maven 命令 报错Unable to add module to the current project as it is not of packaging type &#39;pom&#39;[转]

今天学习在本地搭建Maven工程时,执行了mvn archetype:generate 命令,报错. Unable to create project from archetype [org.apache.maven.archetypes:maven-archetype-quickstart:1.1] Unable to add module to the current project as it is not of packaging type 'pom' 上网搜资料发现一个帖子,问题解决:

解决docker images,info,-d等命令报错的问题

解决docker images,info,-d等命令报错的问题 楼主因为在搞docker,所以出现了好多的问题,百度上不好找,谷歌的话,楼主不会翻墙.不管给大家推荐一个软件:蓝灯. 楼主不管输入那个命令,都出现了: FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host? 以及类似的错误,就连docker version命令都报错了,楼主开始找啊找,找到了好多东西,结果发现没一个能行的

树莓派(Raspberry Pi 3) centos7使用yum命令报错File &quot;/usr/bin/yum&quot;, line 30 except KeyboardInterrupt, e:

使用yum命令报错 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^SyntaxError: invalid syntax 问题如下:  问题出现原因: yum包管理是使用python2.x写的,将python2.x升级到python3.x以后,由于python版本语法兼容性导致问题出现 解决办法: 修改yum配置文件,将python版本指向以前的旧版本 # vi /usr/bin/yum #!/usr/bin/py