错误2:org.apache.hadoop.yarn.exceptions.YarnException:Unauthorized request to start container
. Y& }; L% ^' M8 H6 I5 T
14/04/29 02:45:07 INFO mapreduce.Job: Jobjob_1398704073313_0021 failed with state FAILED due to: Applicationapplication_1398704073313_0021 failed 2 times due to Error launchingappattempt_1398704073313_0021_000002. Got exception:org.apache.hadoop.yarn.exceptions.YarnException: Unauthorized request to startcontainer. ' F4 }0 C* `/ y# L9 A
This token is expired. current time is1398762692768 found 1398711306590
atsun.reflect.GeneratedConstructorAccessor30.newInstance(Unknown Source)5 [& j' H( j0 j9 _4 ?7 o; q6 m
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)7 g- {( w6 [( N) s" `
atjava.lang.reflect.Constructor.newInstance(Constructor.java:525)
atorg.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.instantiateException(SerializedExceptionPBImpl.java:152)& n/ J* ]3 |& a2 q) t* g
at org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.deSerialize(SerializedExceptionPBImpl.java:106), B4 u7 G f, f d6 H
atorg.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:122)0 o+ [. u$ O; S' S- ?3 t. y
atorg.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:249)/ z+ v$ o( g) j* p. G
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
atjava.lang.Thread.run(Thread.java:722)
. Failing the application.6 N G( N1 f9 l& K) z
14/04/29 02:45:07 INFO mapreduce.Job: Counters:0
& M0 e9 z6 h: a7 O
问题原因:namenode,datanode时间同步问题8 y$ c& L f2 W. h/ q( v& K
) a$ K$ ~1 q3 R0 D5 e
解决办法:多个datanode与namenode进行时间同步,在每台服务器执行:ntpdatetime.nist.gov,确认时间同步成功。6 q' N6 }4 N8 u
最好在每台服务器的/etc/crontab 中加入一行:
0 2 * * * root ntpdate time.nist.gov && hwclock –w
|