Win下Eclipse提交hadoop程式出錯:org.apache.hadoop.security.AccessControlException: Permission denied: user=D
描述:在window下使用Eclipse進行hadoop的程式編寫,然後Run on hadoop 後,出現如下錯誤:
11/10/28 16:05:53 INFO mapred.JobClient: Running job: job_201110281103_0003
11/10/28 16:05:54 INFO mapred.JobClient: map 0% reduce 0%
11/10/28 16:06:05 INFO mapred.JobClient: Task Id : attempt_201110281103_0003_m_000002_0, Status : FAILED
org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=DrWho, access=WRITE, inode="hadoop":hadoop:supergroup:rwxr-xr-x
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
解決方法:
到伺服器上修改hadoop的配置檔案:conf/hdfs-core.xml, 找到 dfs.permissions 的配置項 , 將value值改為 false
<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>
修改完貌似要重啟下hadoop的程式才能生效
開發環境:win xp sp3 , Eclipse 3.3 , hadoop-0.20.2
hadoop伺服器部署環境: ubuntu 10.10 , hadoop-0.20.2
小結: 接觸Hadoop沒多久,不知道這樣修改對叢集的安全性有啥影響。
因為Eclipse使用hadoop外掛提交作業時,會預設以 DrWho 身份去將作業寫入hdfs檔案系統中,對應的也就是 HDFS 上的/user/xxx , 我的為/user/hadoop , 由於 DrWho 使用者對hadoop目錄並沒有寫入許可權,所以導致異常的發生。他提供的解決方法為:放開 hadoop 目錄的許可權 , 命令如下 :$ hadoop fs -chmod 777 /user/hadoop
相關文章
- Permission denied:user=xxx,access=WRITE,inode=xxx
- Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission deniedUseExceptionthreadAIApacheHadoop
- git push出現Permission denied (publickey)錯誤Git
- hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inodeHiveExceptionNone
- Android adb除錯出現:opendir failed, Permission deniedAndroid除錯AI
- 極速全景圖下載出錯顯示Permission denied怎麼回事
- nginx部署(13:Permission denied)報錯Nginx
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- Access denied for user 'default'@'%' to database 'shop'報錯Database
- Python 執行報錯 PermissionError: [Errno 13] Permission denied: '***.***'PythonError
- Nginx報錯:Permission denied,沒有許可權!Nginx
- Python報錯:PermissionError: [Errno 13] Permission denied解決方案PythonError
- frepplectl解決報錯:bash: /usr/bin/frepplectl: Permission denied
- 【踩坑筆記】專案出現Permission denied筆記
- git出現Permission denied的解決辦法Git
- laravel mysql批量提交報Access denied 錯誤LaravelMySql
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- Angular macOS Err:EACCES: permission deniedAngularMac
- Nginx: stat() failed (13: permission denied)NginxAI
- 解決方案 git@github.com出現Permission denied (publickey)Github
- Jenkins中構建(Build)Docker映象時出現permission deniedJenkinsUIDocker
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- Android Studio: /dev/kvm device permission deniedAndroiddev
- Error: Permission denied @ apply2filesErrorAPP
- PHP中 mkdir: Permission denied 問題PHP
- 易優CMS後臺上傳圖片報錯mkdir(): Permission denied 報錯-eyoucms
- Permission denied Command PhaseScriptExecution failed with a nonzero exit codeAI
- PermissionError: [Errno 13] Permission denied 如何解決Error
- 解決“su: cannot open session: Permission denied”Session
- Android10 建立檔案 Permission deniedAndroid
- Linux錯誤 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxErrorlocalhost
- 網站程式呼叫資料庫時提示“command denied to user”網站資料庫
- Nginx 日誌 failed (13: Permission denied) 錯誤(13:許可權被拒絕)NginxAI
- 詳解Nginx 13: Permission denied 解決方案Nginx
- unix /var/run/docker.sock: connect: permission deniedDocker
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- PermissionError: [Errno 13] Permission denied解決辦法Error
- listen EACCES: permission denied 0.0.0.0:9520 at Server.setupListenHandleServer