mapreduce 报错

在尝试运行MapReduce作业时遇到一个问题,job_1501233893701_0001由于令牌过期导致失败。Yarn异常指出当前时间与令牌时间不匹配,建议检查系统时间和时区,并进行时间同步。解决方案包括在每台服务器上执行时间同步命令:1)复制Asia/Shanghai时区到/etc/localtime;2)使用ntpdate同步到pool.ntp.org。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[root@master hadoop-2.6.5]# hadoop jar /opt/hadoop-mapreduce-examples-2.6.5.jar wordcount /user/root/ds1.txt /user/root/ds_out
17/07/28 02:50:53 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.88.68:8032
17/07/28 02:50:54 INFO input.FileInputFormat: Total input paths to process : 1
17/07/28 02:50:54 INFO mapreduce.JobSubmitter: number of splits:1
17/07/28 02:50:54 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1501233893701_0001
17/07/28 02:50:55 INFO impl.YarnClientImpl: Submitted application application_1501233893701_0001
17/07/28 02:50:55 INFO mapreduce.Job: The url to track the job: http://master:8088/proxy/application_1501233893701_0001/
17/07/28 02:50:55 INFO mapreduce.Job: Running job: job_1501233893701_0001
17/07/28 02:50:57 INFO mapreduce.Job: Job job_1501233893701_0001 running in uber mode : false
17/07/28 02:50:57 INFO mapreduce.Job: map 0% reduce 0%
17/07/28 02:50:57 INFO mapreduce.Job: Job job_1501233893701_0001 failed with state FAILED due to: Application application_1501233893701_0001 failed 2 times due to Error launching appattempt_1501233893701_0001_000002. Got exception: org.apache.hadoop.yarn.exceptions.YarnException: Unauthorized request to start container.
This token is expired. current time is 1501697320756 found 1501236056864
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:123)
at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:251)
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/07/28 02:50:57 INFO mapreduce.Job: Counters: 0


多个datanode与namenode进行时间同步,在每台服务器执行如下两个命令进行同步
    1)输入 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    2)输入 ntpdate pool.ntp.org
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值