Questions tagged with Amazon DocumentDB

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

mongodb-org-4.0.repo : No such file or directory al instalar el mongo shell en mi AWS Cloud9

I try to connect to my cluster DocumentDB on AWS from AWS C9 with [this tutorial][1]. But every time I try to connect I get connection failed after 6 attempts: (scr_env) me:~/environment/sephora $ mongo --ssl --host xxxxxxxxxxxxx:xxxxx --sslCAFile rds-combined-ca-bundle.pem --username username --password mypassword MongoDB shell version v3.6.3 connecting to: mongodb://xxxxxxxxxxxxx:xxxxx/ 2022-03-22T23:12:38.725+0000 W NETWORK [thread1] Failed to connect to xxx.xx.xx.xxx:xxxxx after 5000ms milliseconds, giving up. 2022-03-22T23:12:38.726+0000 E QUERY [thread1] Error: couldn't connect to server xxxxxxxxxxxxx:xxxxx, connection attempt failed : connect@src/mongo/shell/mongo.js:251:13 @(connect):1:6 exception: connect failed Indeed it seems to be missing the VPC configuration. So I tried to do with [this documentation][2]. But I do not know how to install the mongo shell on my AWS Cloud9. Indeed, it seems that I cannot create the repository file with the `echo -e "[mongodb-org-4.0] \name=MongoDB repository baseurl=...`. returns: `mongodb-org-4.0.repo: No such file or directory`. Also, when I tried to install the mongo shell with `sudo yum install -y mongodb-org-shell` which I did not have, and which I installed, it returns `repolist 0`. [1]: https://www.youtube.com/watch?v=Ild9ay9U_vY [2]: https://stackoverflow.com/a/17793856/4764604
2
answers
0
votes
140
views
asked 8 months ago

"Connect failed" when trying to connect to the DocumentDB cluster from AWS C9

In order to insert data to a cluster with a python script, I try to connect to my cluster DocumentDB on AWS from AWS C9 with [this tutorial][1]. But every time I try to connect I get connection failed after 6 attempts: ``` (scr_env) me:~/environment/sephora $ mongo --ssl --host xxxxxxxxxxxxx:xxxxx --sslCAFile rds-combined-ca-bundle.pem --username username --password mypassword MongoDB shell version v3.6.3 connecting to: mongodb://xxxxxxxxxxxxx:xxxxx/ 2022-03-22T23:12:38.725+0000 W NETWORK [thread1] Failed to connect to xxx.xx.xx.xxx:xxxxx after 5000ms milliseconds, giving up. 2022-03-22T23:12:38.726+0000 E QUERY [thread1] Error: couldn't connect to server xxxxxxxxxxxxx:xxxxx, connection attempt failed : connect@src/mongo/shell/mongo.js:251:13 @(connect):1:6 exception: connect failed ``` I tried to remove the lock file to repair the instance as they do in [this answer][2]: ``` (scr_env) me:~/environment/sephora $ sudo rm /var/lib/mongodb/mongod.lock rm: cannot remove '/var/lib/mongodb/mongod.lock': No such file or directory ``` I know that the "fail to connect" error can be caused by a lot of reasons, but usually they are: - the service (mongo) might not be *running* on the destination server; - the service (mongo) might be *listening* on a different port number; - the service (mongo) might be *protected* by a firewall somewhere on the destination. So how can I ensure that: - mongo is *running* on the destination host? - mongo is *listening* on the defined port? - I've *allowed* to connect to the destination host on the defined port from the IP address or network range you're running the command to connect? [1]: https://www.youtube.com/watch?v=Ild9ay9U_vY [2]: https://stackoverflow.com/a/17793856/4764604
1
answers
0
votes
422
views
asked 8 months ago

DMS Ignore Duplicate key errors while migrating data between DocumentDB instances

We need to replicate data between two collections in AWS documentDB to get rid of duplicate documents. Source and Target is AWS documentDB instances version 4.0.0. I've created a unique index in target table to only allow non-duplicate values. I needed to create index before migrating the data to new target, because our data size in ~1TB and index creation on source collection is impossible. Full load fails after the following error. Task status becomes table error and no data is migrated further to that collection. ``` 2022-03-23T03:13:57 [TARGET_LOAD ]E: Execute bulk failed with errors: 'Multiple write errors: "E11000 duplicate key error collection: reward_users_v4 index: lockId", "E11000 duplicate key error collection: reward_users_v4 index: lockId"' [1020403] (mongodb_apply.c:153) 2022-03-23T03:13:57 [TARGET_LOAD ]E: Failed to handle execute bulk when maximum events per bulk '1000' was reached [1020403] (mongodb_apply.c:433) ``` ``` "ErrorBehavior": { "FailOnNoTablesCaptured": false, "ApplyErrorUpdatePolicy": "LOG_ERROR", "FailOnTransactionConsistencyBreached": false, "RecoverableErrorThrottlingMax": 1800, "DataErrorEscalationPolicy": "SUSPEND_TABLE", "ApplyErrorEscalationCount": 1000000000, "RecoverableErrorStopRetryAfterThrottlingMax": true, "RecoverableErrorThrottling": true, "ApplyErrorFailOnTruncationDdl": false, "DataTruncationErrorPolicy": "LOG_ERROR", "ApplyErrorInsertPolicy": "LOG_ERROR", "ApplyErrorEscalationPolicy": "LOG_ERROR", "RecoverableErrorCount": 1000000000, "DataErrorEscalationCount": 1000000000, "TableErrorEscalationPolicy": "SUSPEND_TABLE", "RecoverableErrorInterval": 10, "ApplyErrorDeletePolicy": "IGNORE_RECORD", "TableErrorEscalationCount": 1000000000, "FullLoadIgnoreConflicts": true, "DataErrorPolicy": "LOG_ERROR", "TableErrorPolicy": "SUSPEND_TABLE" }, ``` How can I configure AWS DMS to continue even if such duplicate key errors keep on happening. I tried modifying the TableErrorEscalation count and many other error counts but loading always stops at first duplicate key error. I have 580k Documents in test workload for this task.
1
answers
0
votes
315
views
Raj
asked 8 months ago

DocumentDB 'ReplicaSetNoPrimary' error

While using AWS Lambda with Node and Mongoose 5.x, we are experiencing **randomly** (=a group or errors every 10-15 minutes) the following error. Sometimes connection establishes just fine, but other times throws a 'replica set no primary' error. The DocDB service is in the same VPC with the Lambdas. Have tried with Mongoose 6.x as well. It performs less well. As far as I can tell this cannot be a firewall issue (since it works most of the time). Profiler / audit logs do not seem to offer any hints either. Any ideas how to troubleshoot this? ``` ReplicaSetNoPrimary MongooseServerSelectionError: Server selection timed out after 5000 ms at NativeConnection.Connection.openUri (/opt/nodejs/node_modules/mongoose/lib/connection.js:847:32) at /opt/nodejs/node_modules/mongoose/lib/index.js:351:10 at /opt/nodejs/node_modules/mongoose/lib/helpers/promiseOrCallback.js:32:5 at new Promise (<anonymous>) at promiseOrCallback (/opt/nodejs/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:10) at Mongoose._promiseOrCallback (/opt/nodejs/node_modules/mongoose/lib/index.js:1149:10) at Mongoose.connect (/opt/nodejs/node_modules/mongoose/lib/index.js:350:20) at connectToMongoDB (/var/task/app/init/db.js:68:20) at Object.<anonymous> (/var/task/app/init/db.js:109:26) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18) at Object.<anonymous> (/var/task/app/init/init.js:7:26) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18) at Object.<anonymous> (/var/task/app/init/index.js:1:18) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) ``` Our configuration looks like this: ```js url: 'mongodb://**********.cluster-*************.********.docdb.amazonaws.com:27017/', opts: { dbName: '************', user: '***************', pass: '************', tls: true, tlsCAFile: caPemFile, useNewUrlParser: true, useUnifiedTopology: true, replicaSet: 'rs0', readPreference: 'secondaryPreferred', retryWrites: false, monitorCommands: true, maxPoolSize: 5, minPoolSize: 1, serverSelectionTimeoutMS: 5000, connectTimeoutMS: 5000, bufferCommands: false, autoCreate: false, autoIndex: false, authSource: 'admin', }, ```
2
answers
0
votes
828
views
aleksi
asked 10 months ago