gpt4 book ai didi

mongodb - MongoNetworkError : failed to connect to server [amazonaws. com:27017] 首次连接时 [错误:无法获取本地颁发者证书

转载 作者:行者123 更新时间:2023-12-05 08:38:49 26 4
gpt4 key购买 nike

我在 Apache 配置文件中有我的 mongo 详细信息。并收到此错误。

SetEnv MONGO_URL mongodb://:@XXXXXXXXX.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=/home/ec2-user/rds-combined-ca-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false

        App 2291 output: MongoNetworkError: failed to connect to server [XXXXXX.docdb.amazonaws.com:27017] on first connect [Error: unable to get local issuer certificate
App 2291 output: at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
App 2291 output: at TLSSocket.emit (events.js:310:20)
App 2291 output: at TLSSocket.EventEmitter.emit (domain.js:482:12)
App 2291 output: at TLSSocket._finishInit (_tls_wrap.js:917:8)
App 2291 output: at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12) {
App 2291 output: name: 'MongoNetworkError',
App 2291 output: [Symbol(mongoErrorContextSymbol)]: {}
App 2291 output: }]

MongoNetworkError: [错误: 无法获取本地颁发者证书

最佳答案

它是固定的。我应该使用 tls=true&tlsCAFile=/var/www/covidapp/rds-combined-ca-bundle.pem 而不是 ssl=true&ssl_ca_certs=/var/www/medapp/rds-combined-ca-bundle.pem

https://developer.mongodb.com/community/forums/t/mongonetworkerror-unable-to-get-local-issuer-certificate/3518/3

关于mongodb - MongoNetworkError : failed to connect to server [amazonaws. com:27017] 首次连接时 [错误:无法获取本地颁发者证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61531432/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com