Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YarnException: Unauthorized request to start container

I have set up hadoop2.2.0 on 3 clusters. Everything is going fine. NodeManager and Datanode are started in each clusters. But, when I run wordcount example, 100% mapping takes place and it gives following exception:

map 100% reduce 0%
13/11/28 09:57:15 INFO mapreduce.Job: Task Id : attempt_1385611768688_0001_r_000000_0, Status : FAILED
Container launch failed for container_1385611768688_0001_01_000003 : org.apache.hadoop.yarn.exceptions.
YarnException: Unauthorized request to start container.
This token is expired. current time is 1385612996018 found 1385612533275
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

I have gone through internet to find out solution. But I couldn't find out. Help me out.

like image 220
Sudo Avatar asked Nov 28 '13 04:11

Sudo


2 Answers

This exception occurs when your nodes have different time settings. Make sure that your all 3 nodes have same time n timezone settings and then restart computer.

This worked for me . Hope this help to you as well !!!!

like image 53
akki.verma22 Avatar answered Sep 18 '22 21:09

akki.verma22


One of the options would be increasing lifespan of container by setting

yarn.resourcemanager.rm.container-allocation.expiry-interval-ms

which is by default is 10 min

E.g.
Service-Wide / Advanced
YARN Service Configuration Safety Valve for yarn-site.xml

    <property>
       <name>yarn.resourcemanager.rm.container-allocation.expiry-interval-ms</name>
       <value>1000000</value>
    </property>
like image 26
Ivan Balashov Avatar answered Sep 19 '22 21:09

Ivan Balashov