hadoop错误org.apache.hadoop.yarn.exceptions.YarnException Unauthorized request to start container

错误:

17/11/22 15:17:15 INFO client.RMProxy: Connecting to ResourceManager at Master/192.168.136.100:8032
17/11/22 15:17:16 INFO input.FileInputFormat: Total input paths to process : 1
17/11/22 15:17:16 WARN hdfs.DFSClient: Caught exception 
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Thread.join(Thread.java:1252)
        at java.lang.Thread.join(Thread.java:1326)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.closeResponder(DFSOutputStream.java:609)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.endBlock(DFSOutputStream.java:370)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:546)
17/11/22 15:17:17 INFO mapreduce.JobSubmitter: number of splits:1
17/11/22 15:17:17 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1511275253885_0004
17/11/22 15:17:17 INFO impl.YarnClientImpl: Submitted application application_1511275253885_0004
17/11/22 15:17:17 INFO mapreduce.Job: The url to track the job: http://Master:8088/proxy/application_1511275253885_0004/
17/11/22 15:17:17 INFO mapreduce.Job: Running job: job_1511275253885_0004
17/11/22 15:17:19 INFO mapreduce.Job: Job job_1511275253885_0004 running in uber mode : false
17/11/22 15:17:19 INFO mapreduce.Job:  map 0% reduce 0%
17/11/22 15:17:19 INFO mapreduce.Job: Job job_1511275253885_0004 failed with state FAILED due to: Application application_1511275253885_0004 failed 2 times due to Error launching appattempt_1511275253885_0004_000002. Got exception: org.apache.hadoop.yarn.exceptions.YarnException: Unauthorized request to start container. 
This token is expired. current time is 1511363838355 found 1511335638708
Note: System times on machines may be out of sync. Check system time and time zones.
        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.yarn.api.records.impl.pb.SerializedExceptionPBImpl.instantiateException(SerializedExceptionPBImpl.java:168)
        at org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.deSerialize(SerializedExceptionPBImpl.java:106)
        at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:122)
        at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:250)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
. Failing the application.
17/11/22 15:17:19 INFO mapreduce.Job: Counters: 0
[root@Master mapreduce]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
cp: "/usr/share/zoneinfo/Asia/Shanghai" 与"/etc/localtime" 为同一文件
[root@Master mapreduce]# ntpdate pool.ntp.org
22 Nov 15:21:30 ntpdate[28360]: step time server 193.228.143.22 offset -11.343113 sec
[root@Master mapreduce]# ^C
[root@Master mapreduce]# ntpdate pool.ntp.org
22 Nov 15:22:12 ntpdate[28365]: adjust time server 193.228.143.22 offset 0.004859 sec
[root@Master mapreduce]# ntpdate s2c.time.edu.cn 
22 Nov 15:31:59 ntpdate[28423]: adjust time server 202.112.10.36 offset -0.017539 sec
原因:

    namenode,datanode时间同步问题

解决办法

    多个datanode与namenode进行时间同步,在每台服务器(master slave1 slaves2)执行如下两个命令进行同步

   例如:

[root@Slave2 mapreduce]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
cp:是否覆盖"/etc/localtime"? y
[root@Slave2 mapreduce]# ntpdate s2c.time.edu.cn
注意:如果提示说:
 
 
[root@Slave2 mapreduce]# ntpdate pool.ntp.org                               
-bash: ntpdate: command not found

应该先下载ntpdate:

yum install -y ntp



猜你喜欢

转载自blog.csdn.net/lirika_777/article/details/78604411
今日推荐