Error Connecting to Mongodb shared cluster. ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR

I get the following error on trying to connect to my mongodb cluster using nodejs.

MongoServerSelectionError: D84D0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1605:SSL alert number 80

at Topology.selectServer (D:\Dev\assignments\edunova\node_modules\mongodb\lib\sdam\topology.js:303:38)
at async Topology._connect (D:\Dev\assignments\edunova\node_modules\mongodb\lib\sdam\topology.js:196:28)
at async Topology.connect (D:\Dev\assignments\edunova\node_modules\mongodb\lib\sdam\topology.js:158:13)
at async topologyConnect (D:\Dev\assignments\edunova\node_modules\mongodb\lib\mongo_client.js:209:17)
at async MongoClient._connect (D:\Dev\assignments\edunova\node_modules\mongodb\lib\mongo_client.js:222:13)
at async MongoClient.connect (D:\Dev\assignments\edunova\node_modules\mongodb\lib\mongo_client.js:147:13) {

reason: TopologyDescription {
type: ‘ReplicaSetNoPrimary’,
servers: Map(3) {
cluster0-shard-00-00.r7eai.mongodb.net:27017’ => [ServerDescription],
cluster0-shard-00-01.r7eai.mongodb.net:27017’ => [ServerDescription],
cluster0-shard-00-02.r7eai.mongodb.net:27017’ => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: ‘atlas-bsfdhx-shard-0’,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined,
[Symbol(errorLabels)]: Set(0) {},
[cause]: MongoNetworkError: D84D0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1605:SSL alert number 80

  at connectionFailureError (D:\Dev\assignments\edunova\node_modules\mongodb\lib\cmap\connect.js:356:20)
  at TLSSocket.<anonymous> (D:\Dev\assignments\edunova\node_modules\mongodb\lib\cmap\connect.js:272:44)
  at Object.onceWrapper (node:events:628:26)
  at TLSSocket.emit (node:events:513: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) {
[Symbol(errorLabels)]: Set(1) { 'ResetPool' },
[cause]: [Error: D84D0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1605:SSL alert number 80
] {
  library: 'SSL routines',
  reason: 'tlsv1 alert internal error',
  code: 'ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR'
}

}
}

After looking around on the internet, it seems that I needed to whitelist my IP in the network access section, so I have done that as well.
I whitelisted my IP address and further allowed any IP to access the cluster.
Yet the error still persists.
is there anything I’m missing?

From node.js - SSL Error - Alert number 80 - When calling server from client - Stack Overflow it seems this is:

An internal error unrelated to the peer or the correctness of the protocol (such as a memory allocation failure) makes it impossible to continue. This message is always fatal.

What version of the Node runtime are you using? It’s possible that upgrading to a newer runtime version may address this.

If upgrading happens to surface a new type of error such as SSL routines:final_renegotiate:unsafe legacy renegotiation disabled, I have an article on how to address that one :slight_smile: