Support Questions

Find answers, ask questions, and share your expertise

Can't get Master Kerberos principal for use as renewer

avatar
Cloudera Employee

Hi team,

I have a cdp cluster running where YARN gateway, Resource Manager has been added as role on host already and on same host, my application is running which tries to submit map reduce job from java code. But I am getting below exception :

 

 

2024-09-27 07:19:00,171 ERROR [Map-Reduce Manager]-com.cloudera.ozone.tiering.mapreduce.MapReduceJobManager: Exception in Map-Reduce Manager Thread.
java.io.IOException: Can't get Master Kerberos principal for use as renewer
	at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:134)
	at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:102)
	at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodes(TokenCache.java:81)
	at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:160)
	at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:278)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:142)
	at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1576)
	at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1573)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1910)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1573)
	at com.cloudera.ozone.tiering.mapreduce.KeyConversionJob.startJob(KeyConversionJob.java:85)
	at com.cloudera.ozone.tiering.mapreduce.KeyConversionJob.access$400(KeyConversionJob.java:31)
	at com.cloudera.ozone.tiering.mapreduce.KeyConversionJob$Runner.run(KeyConversionJob.java:181)
	at com.cloudera.ozone.tiering.mapreduce.MapReduceJobManager.startMapReduceJob(MapReduceJobManager.java:63)
	at com.cloudera.ozone.tiering.mapreduce.MapReduceJobManager.run(MapReduceJobManager.java:146)
	at java.lang.Thread.run(Thread.java:748)

 

 

 I saw some posts from previous reported issues and suggestion was to add YARN gateway and RM on same host where application is running and trying to submit the map reduce job. But still getting error. Can you pls help ?

1 REPLY 1

avatar
Rising Star

@Devesh If you are invoking this JAVA code from the CLI, you have to add the various Hadoop config files to the classpath, othervise they won't be loaded:

  • core-site.xml
  • hdfs-site.xml
  • yarn-site.xml

GW roles will just make sure these are available on the host, but you have to make sure your code is able to access them.