hadoop叢集安裝遇到Duplicate metricsName:getProtocolVersion

edwardking888發表於2010-11-09

最近在安裝HADOOP叢集的時候,報錯誤:

2010-11-09 16:59:07,307 INFO org.apache.hadoop.ipc.Server: Error register getProtocolVersion
java.lang.IllegalArgumentException: Duplicate metricsName:getProtocolVersion
        at org.apache.hadoop.metrics.util.MetricsRegistry.add(MetricsRegistry.java:53)
        at org.apache.hadoop.metrics.util.MetricsTimeVaryingRate.(MetricsTimeVaryingRate.java:89)
        at org.apache.hadoop.metrics.util.MetricsTimeVaryingRate.(MetricsTimeVaryingRate.java:99)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:523)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)

當時是在JOB的LOG報出,沒有注意。後來執行JOB的時候報如下錯誤:


10/11/09 17:19:06 INFO mapred.JobClient: Task Id : attempt_201011091659_0001_m_000003_0, Status : FAILED
Error initializing attempt_201011091659_0001_m_000003_0:
java.lang.IllegalArgumentException: Wrong FS: hdfs://192.168.75.17:9000/hadoop/hadoop/hadoop/tmp/mapred/system/job_201011091659_0001/job.xml, expected: hdfs://hadoop_namenode:9000
        at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:310)
        at org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:99)
        at org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:155)
        at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:453)
        at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:745)
        at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
        at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
        at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

研究發現自己的mapred-site.xml檔案的

mapred.job.tracker節點配置成IP了

原來的格式:


 mapred.job.tracker
 192.168.75.17:9001

應該改成


 mapred.job.tracker
 hadoop_namenode:9001

問題解決!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8183550/viewspace-677807/,如需轉載,請註明出處,否則將追究法律責任。

相關文章