OpsManager 应用程序无法连接到启用了 SSL/TLS 的 opsmanager 数据库

时间:2021-01-15 05:43:34

标签: mongodb ssl

我已经实现了一个 opsmanager 数据库作为副本集..基于以下步骤

https://www.percona.com/blog/2018/05/31/mongodb-deploy-replica-set-with-transport-encryption-part-3/

现在我已经为 opsmanager 应用程序创建了一个实例,现在我想连接到数据库。 为此,我在 conf-mms.properties 中提到了 cert pem 文件。 当我启动应用程序时,在飞行前检查期间我收到此错误

未能刷新数据库属性 com.mongodb.MongoTimeoutException:等待连接时 30000 毫秒后超时。集群状态的客户端视图为{type=UNKNOWN, servers=[{address=xxxx:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sent message},由{javax.net. ssl.SSLHandshakeException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径},由 {sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security。 provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径}

我在 /home/ubuntu 中给出了 .crt 和 .pem 文件,它们是我从 CA 数据库中生成的。 但错误提示无法找到有效的证书路径。

我怀疑以下问题: 1.在数据库实例openssl中给CN时,我使用ip-x-x-x作为主机 现在在 conf.proerties 我已经提到了 ips 2.这样我就可以在每个数据库实例之间进行连接 3.在 mongodb.ssl.CAFile 中,我给出了 .crt 文件,这对吗?

sudo mongo "mongodb://ip-x-x-x-x:27017" \

<块引用>
    --tlsCertificateKeyFile /etc/mongodb/ssl/psmdb1.pem \
    --tls \
    --tlsCAFile /etc/mongodb/ssl/mongoCA.crt

请支持解决此问题

0 个答案:

没有答案
相关问题