首页 > 解决方案 > 通过 SSL 的 LDAP 连接在 Docker 容器中失败,但在 Openshift 容器中工作

问题描述

需要您帮助解决容器问题。

我的问题与容器中 WLP 服务器上运行的 Java 应用程序中通过 SSL 的 LDAP 通信有关。看起来很奇怪,因为相同的图像在 Openshfit 中运行良好,但在 docker 服务器中失败。

详细信息:在 Docker 容器中的 WLP 服务器上运行的 Java 应用程序。LDAP 在 server.xml 和 jks 文件中配置,并提供了所需的证书。创建了 Docker 映像,并且应用程序在容器中运行良好。

Docker:最近,在一些代码更改后,当尝试使用新镜像运行容器时,它开始给出 SSL 相关的错误。后来尝试使用旧图像,这也给出了相同的 SSL 错误。

Openshift:相同的图像(旧的和新的)在 Openshift 环境中运行良好。

所有证书都在密钥库中可用。

错误: Caused by: javax.naming.CommunicationException: simple bind failed: <xxx.yyy.zzz.com:123> [Root exception is javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is: java.security.cert.CertPathValidatorException: The certificate issued by CN=Issuer name, DC=<domain>, DC=abc, DC=com is not trusted; internal cause is: java.security.cert.CertPathValidatorException: Certificate chaining error]

标签: javasslldapcontainersopenshift

解决方案


推荐阅读