微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Jenkins 与 Azure AD 集成失败并显示“处理请求时出现问题”

如何解决Jenkins 与 Azure AD 集成失败并显示“处理请求时出现问题”

有很多可用的帮助。无法修复它。在我输入我的用户名和密码之后。 Jenkins 与 Azure AD 登录成功,它也返回令牌。之后它失败并显示“处理请求时出现问题”。当我看到 Azure 端并且 jenkins ui 也打印令牌时,登录成功。

When I see the error logs,I see 
javax.net.ssl|DEBUG|13|Handling POST /securityRealm/finishLogin from x.x.x.x : Jetty (winstone)-19|2021-07-15 19:36:53.374 EDT|Utilities.java:73|the prevIoUs server name in SNI (type=host_name (0),value=login.microsoftonline.com) was replaced with (type=host_name (0),value=login.microsoftonline.com)
2021-07-15 23:36:55.398+0000 [id=326]   INFO    c.m.a.a.AuthenticationAuthority#doInstancediscovery: [Correlation ID: e11160be-50c3-43d7-96a8-dc02c3cc2b2c] Instance discovery was successful
javax.net.ssl|ERROR|13|Handling POST /securityRealm/finishLogin from x.x.x.x : Jetty (winstone)-19|2021-07-15 19:36:55.769 EDT|TransportContext.java:344|Fatal **** (CERTIFICATE_UNKNowN): PKIX path building Failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (
"throwable" : {

还有

javax.net.ssl|DEBUG|13|Handling POST /securityRealm/finishLogin from x.x.x.x : Jetty (winstone)-19|2021-07-15 19:36:55.773 EDT|SSLSocketImpl.java:1569|close the underlying socket
javax.net.ssl|DEBUG|13|Handling POST /securityRealm/finishLogin from x.x.x.x : Jetty (winstone)-19|2021-07-15 19:36:55.773 EDT|SSLSocketImpl.java:1588|close the SSL connection (initiative)
2021-07-15 23:36:55.787+0000 [id=19]    SEVERE  c.m.j.azuread.AzureSecurityRealm#doFinishLogin: error
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

我已经为 login.microsoftonline.com 和 portal.azure.com 导入了证书,我的 jenkins.xml 有

-Djavax.net.ssl.trustStore="C:\Program Files (x86)\Jenkins\.cacerts\jssecacerts"  -Djavax.net.ssl.trustStorePassword=changeit 

不确定哪个网站说“无法找到到请求目标的有效认证路径”

解决方法

正如在堆栈溢出的另一个条目中发布的那样,我会尝试使用以下内容调试您的 trustStore 发生的情况:

java -Djavax.net.debug=all -Djavax.net.ssl.trustStore="C:\Program Files (x86)\Jenkins\.cacerts\jssecacerts" -Djavax.net.ssl.trustStorePassword=changeit 

您可能想看看this post

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。