首页 > 其他分享 >Kerberos 认证错误 :Can't get Kerberos realm

Kerberos 认证错误 :Can't get Kerberos realm

时间:2022-10-09 15:58:22浏览次数:53  
标签:krb5 realm get Kerberos conf security

原始代码为:

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

相关文章