Mongodb atlas 无法与 Node Js 连接('ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR')

问题描述 投票:0回答:1

我正在尝试使用 MONGO DB ATLAS 构建一个项目,但当我尝试连接到数据库时,我不断收到此错误

 return new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(err), { cause: err });
                   ^

MongoNetworkError: 640B0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1586:SSL alert number 80

    at connectionFailureError (C:\Users\ACER USER\Desktop\work\code\FRED_APP_AI_SERVER\node_modules\mongoose\node_modules\mongodb\lib\cmap\connect.js:379:20) 
    at TLSSocket.<anonymous> (C:\Users\ACER USER\Desktop\work\code\FRED_APP_AI_SERVER\node_modules\mongoose\node_modules\mongodb\lib\cmap\connect.js:285:22)  
    at Object.onceWrapper (node:events:629:26)
    at TLSSocket.emit (node:events:514:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  connectionGeneration: 6,
  [Symbol(errorLabels)]: Set(1) { 'ResetPool' },
  [cause]: [Error: 640B0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1586:SSL alert number 80
  ] {
    library: 'SSL routines',
    reason: 'tlsv1 alert internal error',
    code: 'ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR'
  }
}
  1. 我已尝试将我的 IP 地址列入白名单,但仍然不起作用
  2. 我已经交叉检查了我的 MongoDB uri,它是正确的,但它仍然无法工作
javascript node.js database mongodb networking
1个回答
0
投票

步骤1: mongodb云白名单允许您访问ip

第2步: 您需要通过转到“连接”并连接到“应用程序”来更改连接字符串 enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.