错误描述

Secure Client Cannot Connect ([Caused by GSSException: No valid credentials provided(Mechanism level: Failed to find any Kerberos tgt)])

症状

如果不是klist keytab有效期的问题,却还报这个错

如果是常驻型的服务,例如 nohup ,tomcat等等服务,报错具备某种规律,比如每天12点,或者某个时间段之后。

解决方案

屡试不爽

https://hbase.apache.org/book.html#trouble.client.security.rpc

https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/tutorials/Troubleshooting.html

还有一个问题需要排除,检查服务所用JDK的这个文件。

Java Unlimited Strength Crypto Policy

针对jdk1.8.44以上版本,请将jre/lib/security/java.security文件中的

将 #crypto.policy=unlimited

改为 crypto.policy=unlimited

其他不变,也不需要其他权限jar

针对jdk1.8.44以下版本,请将jre/lib/security/ 下 的 local_policy.jar和US_export_policy.jar替换为官方网站提供了JCE无限制权限策略文件

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐