Good afternoon, I’ve been trying to connect to MongoDB Atlas using node for days, but when I try to validate the connection, the terminal shows:
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://www.mongodb.com/docs/atlas/security-whitelist/ at _handleConnectionErrors (C:\Users\Carniel\Desktop\curso_react\12_REACTGRAM\backend\node_modules\mongoose\lib\connection.js:909:11) at NativeConnection.openUri (C:\U sers\Carniel\Desktop\curso_react\12_REACTGRAM\backend\node_modules\mongoose\lib\connection.js:860:11) at async conn (C:\Users\Carniel\Desktop\curso_react\12_REACTGRAM\backend\config\db.js:11:20) { reason: TopologyDescription { type: ‘ReplicaSetNoPrimary’, servers: Map(3) { ‘cluster0-shard-00-02.ycvyn.mongodb.net:27017’ => [ServerDescription], ‘cluster0-shard-00-00.ycvyn.mongodb.net:27017’ => [ServerDescription], ‘cluster0-shard-00-01.ycvyn.mongodb.net :27017’ => [ServerDescription] }, stale: false, compatible: true, heartbeatFrequencyMS: 10000, localThresholdMS: 15, setName: ‘atlas-4uzcpk-shard-0’, maxElectionId: null, maxSetVersion: null, commonWireVersion: 0, logicalSessionTimeoutMinutes: null },
code: undefined
}
I’ve already checked everything within my reach, I need help to try to solve this problem