博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hadoop命令报错:权限问题
阅读量:5927 次
发布时间:2019-06-19

本文共 4861 字,大约阅读时间需要 16 分钟。

root用户执行hadoop命令报错:

[root@vmocdp125 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.144org.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 itemsdrwxrwx---   - ambari-qa hdfs          0 2016-09-14 19:48 /user/ambari-qadrwxr-xr-x   - hcat      hdfs          0 2016-09-14 20:09 /user/hcatdrwx------   - hdfs      hdfs          0 2016-09-20 18:51 /user/hdfsdrwxr-xr-x   - hive      hdfs          0 2016-09-14 20:11 /user/hivedrwxr-xr-x   - hdfs      hdfs          0 2016-09-20 18:49 /user/ocetldrwxrwxr-x   - spark     hdfs          0 2016-09-14 20:00 /user/spark

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

[root@vmocdp125 conf]# sudo -u hdfs hadoop fs -ls /userFound 6 itemsdrwxrwx---   - ambari-qa hdfs          0 2016-09-14 19:48 /user/ambari-qadrwxr-xr-x   - hcat      hdfs          0 2016-09-14 20:09 /user/hcatdrwx------   - hdfs      hdfs          0 2016-09-20 18:51 /user/hdfsdrwxr-xr-x   - hive      hdfs          0 2016-09-14 20:11 /user/hivedrwxr-xr-x   - hdfs      hdfs          0 2016-09-20 18:49 /user/ocetldrwxrwxr-x   - spark     hdfs          0 2016-09-14 20:00 /user/spark

  

 

转载于:https://www.cnblogs.com/zwgblog/p/5901048.html

你可能感兴趣的文章
linux文件权限
查看>>
MySQL学习笔记之五:存储引擎和查询缓存
查看>>
关于ubuntu 14.04 dpkg 问题
查看>>
使用php最容易犯的11个MySQL错误。
查看>>
有梦想就有前进的动力
查看>>
windows 提权 cve-2018-8897
查看>>
局域网屏幕监控软件
查看>>
hibernate.cfg.xml的一些事
查看>>
Java IO(一)
查看>>
SpringBoot获取ApplicationContext
查看>>
RHCE 学习笔记(24) - LVM 逻辑卷
查看>>
多线程介绍和多线程模块-lock-互斥锁
查看>>
Windows用户安全小技巧
查看>>
centos服务器解决vsftp连接时的“550 Create directory operation failed.”错误
查看>>
secureCRT常用设置
查看>>
oop1
查看>>
Angular变化检测机制
查看>>
SaltStack入门篇之远程执行和配置管理
查看>>
我的友情链接
查看>>
commons-lang3:DateUtils
查看>>