You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current setup - ECS with role attached - connection using mongoose working without any special flags/options
Desired setup - move to EKS, backend will have service account with assume role which pre-defined with relevant access.
Current issue: mongoose report AuthenticationFailed.
To test the issue I run a small python pod to make sure the connection is working
Here is the log:
Connecting on EKS to MongoDB at: mongodb+srv://***.***.mongodb.net/db-name?authSource=%24external&authMechanism=MONGODB-AWS&retryWrites=true&w=majority
mongoose connection attempt 0 0
(node:1) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode.
SDK releases are limited to address critical bug fixes and security issues only.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the blog post at https://a.co/cUPnyil
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) [DEP0170] DeprecationWarning: The URL mongodb://***-shard-00-***.mongodb.net:27017,***-shard-00-***.mongodb.net:27017,***-shard-00-***.mongodb.net:27017/dn-name?authSource=%24external&replicaSet=atlas-t3f02t-shard-0&authMechanism=MONGODB-AWS&retryWrites=true&w=majority&ssl=true is invalid. Future versions of Node.js will throw an error.
(node:1) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
Connecting on EKS to MongoDB at: mongodb+srv://****.***.mongodb.net/dn-name?authSource=%24external&authMechanism=MONGODB-AWS&retryWrites=true&w=majority
mongoose connection attempt 1 200
mongo error MongoNetworkError: failed to connect to server [***-shard-00-02.***.mongodb.net:27017] on first connect [MongoError: Authentication failed.
at Connection.messageHandler (/app/node_modules/mongodb/lib/core/connection/connection.js:364:19)
at Connection.emit (node:events:519:28)
at Connection.emit (node:domain:488:12)
at processMessage (/app/node_modules/mongodb/lib/core/connection/connection.js:456:10)
at TLSSocket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connection.js:625:15)
at TLSSocket.emit (node:events:519:28)
at TLSSocket.emit (node:domain:488:12)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
ok: 0,
code: 18,
codeName: 'AuthenticationFailed',
'$clusterTime': [Object],
operationTime: [Timestamp]
}]
Not sure what are my next steps to troubleshoot in here?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Our current setup - ECS with role attached - connection using mongoose working without any special flags/options
Desired setup - move to EKS, backend will have service account with assume role which pre-defined with relevant access.
Current issue: mongoose report
AuthenticationFailed
.To test the issue I run a small python pod to make sure the connection is working
Here is the log:
Not sure what are my next steps to troubleshoot in here?
Beta Was this translation helpful? Give feedback.
All reactions