原始代码为:
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf)
出现错误:
Can't get Kerberos realm
原因:
程序读取不到krb5.conf
解决办法:
在JVM启动参数中添加了参数
代码静态模块中添加:System.setProperty("java.security.krb5.conf", "C:/data/krb5.conf"); 或启动时添加 -Djava.security.krb5.conf=/etc/krb5.conf
标签:krb5,realm,get,Kerberos,conf,security From: https://www.cnblogs.com/kevinlucky/p/16772405.html