Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission deniedUse
Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=zhuy, access=WRITE, inode="/user":root:supergroup:drwxr-xr-x
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:257)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:238)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:179)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:6545)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:6527)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkAncestorAccess(FSNamesystem.java:6479)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:4290)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInt(FSNamesystem.java:4260)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:4233)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:853)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:600)
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:619)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:975)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2040)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2036)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1656)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2034)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:73)
at org.apache.hadoop.hdfs.DFSClient.primitiveMkdir(DFSClient.java:2744)
at org.apache.hadoop.hdfs.DFSClient.mkdirs(DFSClient.java:2713)
at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:870)
at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:866)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileSystem.java:866)
at org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:859)
at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1817)
at CreateDir.main(CreateDir.java:19)
Permission denied: user=zhuy, access=WRITE, inode="/user":root:supergroup:drwxr-xr-x
從這句話我們可知道是許可權問題
所以要修改許可權在 hdfs-site.xml加入如下程式碼
這個檔案在hadoopxxx/etc/hadoop的目錄下
修改完需要重啟hdfs
<property>
<name>dfs.permissions</name>
<value>false</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>
相關文章
- Exception in thread “main” 終極解決方案ExceptionthreadAI
- Exception in thread "main" java.lang.NullPointerException: Cannot invokeExceptionthreadAIJavaNull
- jmeter報錯“Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]“JMeterExceptionthreadAI
- Java報錯:Exception in thread "main" java.lang.UnsupportedClassVersionErrorJavaExceptionthreadAIError
- Appcrawler 執行報錯 Exception in thread "main" java.lang.NullPointerExceptionAPPExceptionthreadAIJavaNull
- Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/http/conn/socket/LayeredConnecExceptionthreadAIJavaErrorApacheHTTP
- 解決:Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.ExceptionthreadAIJavaElasticsearch
- Exception in thread “main“ java.lang.ArrayStoreException解決方案(記錄一下)ExceptionthreadAIJava
- myeclipse執行tomcat報錯Exception in thread "main" java.lang.OutOfMemoryError: PermGen space...EclipseTomcatExceptionthreadAIJavaError
- Exception in thread “main” com.sun.xml.internal.ws.model.RuntimeModelerException: 必須在沒有程式包的類上指定 @WebService.targetNamespace。ExceptionthreadAIXMLWebnamespace
- 找不到so的問題,in thread “main“ java.lang.UnsatisfiedLinkError: no xxlibrary in java.library.paththreadAIJavaError
- 開源相機管理庫Aravis例程學習(二)——連續採集multiple-acquisition-main-threadUIAIthread
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- Oracle exceptionOracleException
- Main()方法AI
- Threadthread
- thread.Interrupt()與thread.Abort()thread
- 異常(Exception)Exception
- Exception和ErrorExceptionError
- 找不到 main 方法, 請將 main 方法定義為: public static void main(String[] args)AI
- AS執行main()方法報錯:SourceSet with name ‘main‘ not foundAI
- 2788647047_mainAI
- 存檔mainAI
- Hello,Threadthread
- Thread類thread
- Thread jointhread
- tomcat one connection one thread one request one threadTomcatthread
- Sanic Exception – 異常Exception
- java exception and finally returnJavaException
- ch12_exceptionException
- go run main.go undefined? golang main包那點事AIUndefinedGolang
- if __name__==”__main__”:AI
- HTML <main> 標籤HTMLAI
- if __name__ == ‘__main__‘AI
- Animal Cotroller文件——MainAI
- Java - 25 main方法JavaAI
- Laravel-permission 中文翻譯Laravel
- Angular macOS Err:EACCES: permission deniedAngularMac