1. 程式人生 > >window下eclipse執行叢集mr時錯誤總結

window下eclipse執行叢集mr時錯誤總結


    1.叢集提交修改項


      a.確保JobAPP提交至叢集
      解決方案:修改mapred-site.xml
                     mapreduce.framework.name = yarn

      b.報重新連線:0.0.0.0/0.0.0.0:8032
      解決方案: 修改yarn-site.xml檔案
                      yarn.resourcemanager.hostname = master

      C.拋異常:ExitCodeException exitCode=1: /bin/bash: line 0: fg: no job control
      解決方案:修改mapred-site.xml
                    mapreduce.app-submission.cross-platform = true

      d.無結果:沒有生成Jar檔案
        解決方案:打jar包。放置到classpath下:右鍵jar包-->Bulid Path-->add to Bulid Path
      
      e.報重新連線:0.0.0.0/0.0.0.0:10020埠


      解決方案:開啟history server
           $>mr-jobhistory-daemon.sh start historyserver
       修改mapred-site.xml:mapreduce.jobhistory.address = master:10020

      2:執行沒有顯示日誌資訊

       在hadoop的安裝目錄下的share目錄下搜尋log4j.properties(大小約10.9k),把它放入工程的src下

      3:Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=Administrator, access=EXECUTE, inode="/tmp/hadoop-yarn/staging/Administrator/.staging":michael:supergroup:drwxrwx---

有以下四種方法解決:

       1、把使用者名稱改成和叢集中使用者名稱一致

       2、在環境變數裡面加上HADOOP_USER_NAME     值是叢集中使用者名稱(需要重啟)

       3、右鍵-》run as -》run Configurations -》選中要執行的工程 -》 第二個選項卡Arguments -》 VM arguments下加上-DHADOOP_USER_NAME=你的叢集上的使用者名稱

       4、去掉許可權驗證

           在叢集的hdfs-site.xml下加入下面配置

              <property>

                <name>dfs.permissions.enabled</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>

       4、null\bin\winitil.exe

              設定環境變數

              HADOOP_HOME  值你的hadoop的安裝路徑

               在path裡面加上%HADOOP_HOME%\bin和%HADOOP_HOME%\sbin

               需要重啟