3 Antworten
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
BTW I'm using mongoose 5.9.22 which is compatible with mongodb 3.6 and works against a local instance of mongodb installed. https://mongoosejs.com/docs/compatibility.html
beantwortet vor 4 Jahren
0
I noticed the line below from https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-from-outside-a-vpc.html and updated my connection to not set the replicaSet and readPreference and I still have the same issue.
When using an SSH tunnel, we recommend that you connect to your cluster using the cluster endpoint and do not attempt to connect in replica set mode (i.e., specifying replicaSet=rs0 in your connection string) as it will result in an error.
I also updated my forwarding to connect to the instance instead of the endpoint without any luck.
Edited by: tnataws on Jul 20, 2020 7:33 PM
beantwortet vor 4 Jahren
0
Finally figured it out -- thankfully user error and not an issue with any library. After switching to not set the replicaSet when connecting through tunnel, my TLS settings weren't getting set.
mongoose.createConnection('mongodb://localhost:27018', {
dbName: 'myDB',
retryWrites: false,
useFindAndModify: false,
useNewUrlParser: true,
useUnifiedTopology: true,
//replicaSet: 'rs0',
//readPreference: 'secondaryPreferred',
auth: {
user: '...',
password: '...'
},
tls: true
tlsCAFile: '/path/to/rds-combined-ca-bundle.pem',
tlsAllowInvalidHostNames: true
})
beantwortet vor 4 Jahren
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 8 Monaten
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 10 Monaten