3 Risposte
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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
con risposta 4 anni fa
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
con risposta 4 anni fa
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
})
con risposta 4 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 8 mesi fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 2 anni fa