Kerberos 错误:GSSHeader 没有找到正确的标签 [英] Kerberos error: GSSHeader did not find the right tag

查看:45
本文介绍了Kerberos 错误:GSSHeader 没有找到正确的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试建立到 SOAP 服务 wsdl url 的 Kerberos 身份验证连接.我能够成功建立连接并拨打服务电话.启动服务器后,我至少可以成功调用一次服务.但是,在几次请求(1 个或多个)之后,我突然收到无效令牌错误.一旦我收到错误,以后的调用就不起作用并且错误仍然存​​在.

I’m trying to make Kerberos authentication connection to a SOAP service wsdl url. I’m able to establish connection successfully and make service calls. After I start my server, I’m able to make successful service call at least once. However after few requests (1 or more ), I suddenly get invalid token error. Once I get the error, future calls do not work and error persists.

如果我重新启动服务器,则服务调用至少会再次运行一次.以上循环继续.

IF I restart my server, then again service call works at least once. And above cycle continues.

我无法弄清楚为什么令牌突然变得无效,尽管它更早起作用.并重新启动服务器使令牌再次有效.

这是错误堆栈跟踪:

Caused by: GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
        at sun.security.jgss.GSSHeader.<init>(GSSHeader.java:97)
        at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:237)
        at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)

推荐答案

我找不到令牌无效的根本原因.但这是我如何解决这个问题.

I could not find root cause for why token is invalid. But here is how i get around this issue.

在我重新启动服务器并在上下文中再次加载 bean 后,我的身份验证第一次开始工作.所以我将 spring bean 的范围更改为 prototype 以便每次创建新的代理 bean 时.

My authentication was working for first time after I restart my server and bean is loaded again in context. So I changed scope of my spring bean to prototype so that every time new proxy bean is created.

这篇关于Kerberos 错误:GSSHeader 没有找到正确的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆