任務100%並且輸出counter後報錯

Job failed as tasks failed. failedMaps:318 failedReduces:0

20/04/25 19:03:26 INFO mapreduce.Job: Counters: 38
    File System Counters
        FILE: Number of bytes read=28334009060292
        FILE: Number of bytes written=56382304065049
        FILE: Number of read operations=0
        FILE: Number of large read operations=0
        FILE: Number of write operations=0
        HDFS: Number of bytes read=9352178036354
        HDFS: Number of bytes written=1719123
        HDFS: Number of read operations=2536861
        HDFS: Number of large read operations=0
        HDFS: Number of write operations=4503
    Job Counters 
        Failed map tasks=318
        Killed map tasks=1507
        Killed reduce tasks=6150
        Launched map tasks=4859
        Data-local map tasks=4860
        Total time spent by all maps in occupied slots (ms)=135622725632
        Total time spent by all reduces in occupied slots (ms)=0
        Total time spent by all map tasks (ms)=8476420352
        Total time spent by all reduce tasks (ms)=0
        Total vcore-milliseconds taken by all map tasks=8476420352
        Total vcore-milliseconds taken by all reduce tasks=0
        Total megabyte-milliseconds taken by all map tasks=34719417761792
        Total megabyte-milliseconds taken by all reduce tasks=0
    Map-Reduce Framework
        Map input records=46457602802
        Map output records=99481356784
        Map output bytes=28410760966435
        Map output materialized bytes=27815802763868
        Input split bytes=16099715
        Combine input records=0
        Spilled Records=194138465344
        Failed Shuffles=0
        Merged Map outputs=0
        GC time elapsed (ms)=107642285
        CPU time spent (ms)=2817198230
        Physical memory (bytes) snapshot=13378997972992
        Virtual memory (bytes) snapshot=25163525361664
        Total committed heap usage (bytes)=15045532581888
    File Input Format Counters 
        Bytes Read=0
20/04/25 19:03:28 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:64156. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)
20/04/25 19:03:29 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:64156. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)
20/04/25 19:03:30 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:64156. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:28 INFO mapred.ClientServiceDelegate: Application state is completed. FinalApplicationStatus=FAILED. Redirecting to job history server
20/04/25 19:04:29 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:30 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:31 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:32 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:33 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:34 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:35 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:36 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:37 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:38 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:39 INFO mapred.ClientServiceDelegate: Application state is completed. FinalApplicationStatus=FAILED. Redirecting to job history server
20/04/25 19:04:40 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:41 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:42 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:43 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:44 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:45 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:46 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:47 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:48 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:49 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:49 INFO mapred.ClientServiceDelegate: Application state is completed. FinalApplicationStatus=FAILED. Redirecting to job history server
20/04/25 19:04:50 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:51 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:52 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:53 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:54 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:55 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:56 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:57 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:58 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
20/04/25 19:04:59 INFO ipc.Client: Retrying connect to server: hadoop-mn01/10.11.60.166:10020. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
Exception in thread "main" java.io.IOException: java.net.ConnectException: Call From hadoop-mn01/10.11.60.166 to hadoop-mn01:10020 failed on connection exception: java.net.ConnectException: 拒絕連接; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
    at org.apache.hadoop.mapred.ClientServiceDelegate.invoke(ClientServiceDelegate.java:344)
    at org.apache.hadoop.mapred.ClientServiceDelegate.getJobStatus(ClientServiceDelegate.java:429)
    at org.apache.hadoop.mapred.YARNRunner.getJobStatus(YARNRunner.java:601)
    at org.apache.hadoop.mapreduce.Job$1.run(Job.java:323)
    at org.apache.hadoop.mapreduce.Job$1.run(Job.java:320)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1762)
    at org.apache.hadoop.mapreduce.Job.updateStatus(Job.java:320)
    at org.apache.hadoop.mapreduce.Job.isSuccessful(Job.java:616)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1323)
    at cn.mastercom.bigdata.mro.loc.job.MroLableFillMains.main(MroLableFillMains.java:270)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:226)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:141)
Caused by: java.net.ConnectException: Call From hadoop-mn01/10.11.60.166 to hadoop-mn01:10020 failed on connection exception: java.net.ConnectException: 拒絕連接; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792)
    at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:732)
    at org.apache.hadoop.ipc.Client.call(Client.java:1480)
    at org.apache.hadoop.ipc.Client.call(Client.java:1413)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)
    at com.sun.proxy.$Proxy15.getJobReport(Unknown Source)
    at org.apache.hadoop.mapreduce.v2.api.impl.pb.client.MRClientProtocolPBClientImpl.getJobReport(MRClientProtocolPBClientImpl.java:133)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.mapred.ClientServiceDelegate.invoke(ClientServiceDelegate.java:325)
    ... 17 more
Caused by: java.net.ConnectException: 拒絕連接
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:495)
    at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:615)
    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:713)
    at org.apache.hadoop.ipc.Client$Connection.access$2900(Client.java:376)
    at org.apache.hadoop.ipc.Client.getConnection(Client.java:1529)
    at org.apache.hadoop.ipc.Client.call(Client.java:1452)
    ... 25 more

解決方法

jps發現job history service 沒有啓動

能是多次重啓服務導致的,或者未開啓historyserver導致

解決方法就是啓動historyserver進程

輸入命令 mr-jobhistory-daemon.sh start historyserver 解決

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章