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>
相關文章
- oracle dbca報Exception in thread mainOracleExceptionthreadAI
- Exception in thread "main" java.lang.UnsupportedClassVersionError:ExceptionthreadAIJavaError
- Exception in thread "main" java.lang.NoClassDefFoundErrorExceptionthreadAIJavaError
- Exception in thread “main” 終極解決方案ExceptionthreadAI
- Exception in thread "main" java.lang.NullPointerException: Cannot invokeExceptionthreadAIJavaNull
- Java報錯:Exception in thread "main" java.lang.UnsupportedClassVersionErrorJavaExceptionthreadAIError
- Exception in thread "main" java.lang.ClassCastException: $Proxy13ExceptionthreadAIJavaAST
- jmeter報錯“Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]“JMeterExceptionthreadAI
- Exception in thread "main" java.lang.NoClassDefFoundError錯誤資訊(轉帖)ExceptionthreadAIJavaError
- Appcrawler 執行報錯 Exception in thread "main" java.lang.NullPointerExceptionAPPExceptionthreadAIJavaNull
- oracle dbca報Exception in thread main 問題解決一例OracleExceptionthreadAI
- Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/http/conn/socket/LayeredConnecExceptionthreadAIJavaErrorApacheHTTP
- Exception in thread “main“ java.lang.ArrayStoreException解決方案(記錄一下)ExceptionthreadAIJava
- Oracle 11g 安裝RAC時報錯'Exception in thread "main" java.lang'OracleExceptionthreadAIJava
- Exception in thread "main" java.lang.UnsatisfiedLinkError: i386/libawt.soExceptionthreadAIJavaError
- 解決:Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.ExceptionthreadAIJavaElasticsearch
- Exception in thread "main" ,設定Oracle9i,10g環境變數ExceptionthreadAIOracle變數
- myeclipse執行tomcat報錯Exception in thread "main" java.lang.OutOfMemoryError: PermGen space...EclipseTomcatExceptionthreadAIJavaError
- 為何在JBoss中釋出Message-Driven Bean總出Exception in thread "main" javax.naming.NamBeanExceptionthreadAIJava
- 【原】MyEclipse8.5整合Tomcat7時啟動錯誤:Exception in thread “main” java.lang.NoClassDefFoundErrorEclipseTomcatExceptionthreadAIJavaError
- 請問錯誤提示Exception in thread "main" java.lang.NoClassDefFoundError是否是環境變數的配置問題ExceptionthreadAIJavaError變數
- myeclipse中傳送郵件出現Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStreamEclipseExceptionthreadAIJavaError
- Exception in thread “main” com.sun.xml.internal.ws.model.RuntimeModelerException: 必須在沒有程式包的類上指定 @WebService.targetNamespace。ExceptionthreadAIXMLWebnamespace
- Win下Eclipse提交hadoop程式出錯:org.apache.hadoop.security.AccessControlException: Permission denied: user=DEclipseHadoopApacheException
- Error: Exception was raised when calling per-thread-terminate function in extension lrwreplaymain.dlErrorExceptionAIthreadFunction
- ExceptionException
- activity_main與fragment_mainAIFragment
- main方法AI
- Main()方法AI
- 找不到so的問題,in thread “main“ java.lang.UnsatisfiedLinkError: no xxlibrary in java.library.paththreadAIJavaError
- Thread.join()方法實現main()方法等待所有子執行緒執行完成[base jdk8]threadAI執行緒JDK
- 開源相機管理庫Aravis例程學習(二)——連續採集multiple-acquisition-main-threadUIAIthread
- Oracle exceptionOracleException
- Java——ExceptionJavaException
- AS執行main()方法報錯:SourceSet with name ‘main‘ not foundAI
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- 存檔mainAI
- 2788647047_mainAI