Boa Noite, estou tentando conectar no banco de dados da mongoose fazendo os mesmos passos da professora mas sempre da essa mensagem : eu peguei meu ip através do ipconfig e coloquei la no mongoose
Erro de conexao MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/ at NativeConnection.Connection.openUri (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\connection.js:807:32) at E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\index.js:342:10 at E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5 at new Promise () at promiseOrCallback (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10) at Mongoose.promiseOrCallback (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\nodemodules\mongoose\lib\index.js:1176:10) at Mongoose.connect (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\index.js:341:20) at file:///E:/users/mata/desktop/programacao/alura/backEnd/JacquelineOliveira/alura-node/src/config/dbConnect.js:3:10 at ModuleJob.run (node:internal/modules/esm/module_job:197:25) at async Promise.all (index 0) { reason: TopologyDescription { type: 'ReplicaSetNoPrimary', servers: Map(3) { 'alura-shard-00-01.wpvlt.mongodb.net:27017' => [ServerDescription], 'alura-shard-00-02.wpvlt.mongodb.net:27017' => [ServerDescription], 'alura-shard-00-00.wpvlt.mongodb.net:27017' => [ServerDescription] }, stale: false, compatible: true, heartbeatFrequencyMS: 10000, localThresholdMS: 15, setName: 'atlas-yvdpnd-shard-0', logicalSessionTimeoutMinutes: undefined } } node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^
MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/ at NativeConnection.Connection.openUri (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\connection.js:807:32) at E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\index.js:342:10 at E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5 at new Promise () at promiseOrCallback (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10) at Mongoose.promiseOrCallback (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\nodemodules\mongoose\lib\index.js:1176:10) at Mongoose.connect (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongoose\lib\index.js:341:20) at file:///E:/users/mata/desktop/programacao/alura/backEnd/JacquelineOliveira/alura-node/src/config/dbConnect.js:3:10 at ModuleJob.run (node:internal/modules/esm/module_job:197:25) at async Promise.all (index 0) { reason: TopologyDescription { type: 'ReplicaSetNoPrimary', servers: Map(3) { 'alura-shard-00-01.wpvlt.mongodb.net:27017' => ServerDescription { hostAddress: HostAddress { isIPv6: false, host: 'alura-shard-00-01.wpvlt.mongodb.net', port: 27017 }, address: 'alura-shard-00-01.wpvlt.mongodb.net:27017', type: 'Unknown', hosts: [], passives: [], arbiters: [], tags: {}, minWireVersion: 0, maxWireVersion: 0, roundTripTime: -1, lastUpdateTime: 1062360485, lastWriteDate: 0, error: MongoNetworkError: connection to 18.229.84.50:27017 closed at Connection.handleIssue (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\nodemodules\mongodb\lib\cmap\connection.js:122:23) at TLSSocket. (E:\users\mata\desktop\programacao\alura\backEnd\JacquelineOliveira\alura-node\node_modules\mongodb\lib\cmap\connection.js:63:39)
Obrigado