You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Emmanuel Espina <es...@gmail.com> on 2013/11/27 03:57:05 UTC

Fwd: AM cannot register with RM (Token auth not supported)

I did an experiment on building a small client + application master to
run on YARN

Im having problems registering the Application Master with the
Resource Manager. In the log I see

2013-11-26 14:03:33 DEBUG SaslRpcClient:261 - Get token info
proto:interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolPB
info:null
2013-11-26 14:03:33 ERROR UserGroupInformation:1494 -
PriviledgedActionException as:emmanuel (auth:SIMPLE)
cause:org.apache.hadoop.security.AccessControlException: Client cannot
authenticate via:[TOKEN]

Aparently ApplicationMasterProtocolPB does not support Token Auth and
since YARN-961 was commited this auth method is forced and SIMPLE was
removed. In ApplicationMasterService.java:124 you can see:

    // If the auth is not-simple, enforce it to be token-based.
    serverConf = new Configuration(conf);
    serverConf.set(
        CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,
        SaslRpcServer.AuthMethod.TOKEN.toString());

Im running in a single node cluster, hadoop 2.2.0, configuration files
without any change from the version that comes in the tar
My AM code is very simple

public static void main(String[] args) throws Exception {

YarnConfiguration hConfig = new YarnConfiguration();
AMRMClient<ContainerRequest> amClient = AMRMClient.createAMRMClient();
amClient.init(hConfig);
amClient.start();
amClient.registerApplicationMaster("localhost", 0, "http://localhost:1234");

while(true){
amClient.allocate(0);
Thread.sleep(10000);
}
}

Thanks
Emmanuel