-
Type: Question
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: 3.5.0, 4.2.2, 4.9.1
-
Component/s: None
Hello,
I am trying to set up a MongoDB Connection via the node driver. It works as expected when i connect to a regular database, but won't work with a replica set db.
I have tried switching between different mongodb drivers (node) but with no success.
Currently using:
Node v16.17.0
mongodb v4.9.1
ubuntu v22
typescript v4.8.2
const uri = "mongodb://host:27017";
const werden = {
auth:
,
ssl: true,
sslCA: "path/to/self-signedCA",
tlsAllowInvalidCertificates: true,
replicaSet: "rs01",
};
it returns this error:
```
MongoServerSelectionError: getaddrinfo EAI_AGAIN 3d58bb2f4108
at Timeout._onTimeout (....../node_modules/mongodb/lib/sdam/topology.js:293:38)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
servers: Map(1)
,
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: 'rs01',
maxElectionId: new ObjectId("7fffffff0000000000000016"),
maxSetVersion: 1,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined,
[Symbol(errorLabels)]: Set(0) {}
}
```
- depends on
-
NODE-4625 Investigate NODE-4624 - Connection to replicaSet fails
- Closed