3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
répondu il y a 4 ans
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
répondu il y a 4 ans
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
})
répondu il y a 4 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un mois
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 8 mois
- AWS OFFICIELA mis à jour il y a 2 ans