java.io.IOException: Can't get Master Kerberos principal for use as renewer 错误解决

Posted zuoql

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java.io.IOException: Can't get Master Kerberos principal for use as renewer 错误解决相关的知识,希望对你有一定的参考价值。

最近在集群中执行调度任务,或者是 在集群中执行 hadoop distcp 命令都会报这样的问题。

java.io.IOException: Can‘t get Master Kerberos principal for use as renewer
- at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:133)
 at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:100)
at org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodes(TokenCache.java:80)
 at org.apache.hadoop.tools.SimpleCopyListing.validatePaths(SimpleCopyListing.java:191)
at org.apache.hadoop.tools.CopyListing.buildListing(CopyListing.java:85)
 at org.apache.hadoop.tools.GlobbedCopyListing.doBuildListing(GlobbedCopyListing.java:90)
 at org.apache.hadoop.tools.CopyListing.buildListing(CopyListing.java:86)
 at org.apache.hadoop.tools.DistCp.createInputFileListing(DistCp.java:429)
 at org.apache.hadoop.tools.DistCp.prepareFileListing(DistCp.java:91)
at org.apache.hadoop.tools.DistCp.execute(DistCp.java:181)
at org.apache.hadoop.tools.DistCp.run(DistCp.java:143)
 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.tools.DistCp.main(DistCp.java:493)

经过源码分析:

 代码中会去读取yarn的配置文件,如果读不到yarn的配置文件,就会报这样的错误。

解决方法:

与机器的HADOOP_CLASSPATH 环境变量有关,我们是有同事添加了错误的HADOOP_CLASSPATH 环境变量,最终在机器上移掉该环境变量,就可以工作了

以上是关于java.io.IOException: Can't get Master Kerberos principal for use as renewer 错误解决的主要内容,如果未能解决你的问题,请参考以下文章

java.io.IOException: Can't get Master Kerberos principal for use as renewer 错误解决

HBase中此类异常解决记录org.apache.hadoop.ipc.RemoteException(java.io.IOException):

Linux 环境下载allure-commandline环境相关问题配置环境变量问题

Flink访问带kerberos认证的kafka: Can‘t get Master Kerberos principal for use as renewer

解决Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory

React Native:错误:[消息/未知] java.io.IOException:java.util.concurrent.ExecutionException:java.io.IOExcept