Hello. I hope I’m right here.
My Ubuntu server was running pretty smoothly and without any problems until the day before yesterday. and since then this error comes up:
MongooseError: Operation `users.findOne()` buffering timed out after 10000ms
at Timeout.<anonymous> (/home/container/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:175:23)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7) Unhandled Rejection at Promise
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 Connection.openUri (/home/container/node_modules/mongoose/lib/connection.js:825:32)
at /home/container/node_modules/mongoose/lib/index.js:414:10
at /home/container/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/container/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10)
at Mongoose._promiseOrCallback (/home/container/node_modules/mongoose/lib/index.js:1288:10)
at Mongoose.connect (/home/container/node_modules/mongoose/lib/index.js:413:20)
at authorize (/home/container/index.js:54:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
servers: Map(3) {
'ac-0ddk8at-shard-00-00.s3lxppu.mongodb.net:27017' => [ServerDescription],
'ac-0ddk8at-shard-00-01.s3lxppu.mongodb.net:27017' => [ServerDescription],
'ac-0ddk8at-shard-00-02.s3lxppu.mongodb.net:27017' => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: 'atlas-olf0a9-shard-0',
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined
} Unhandled Rejection at Promise
The connection to MongoDB works without problems.
compass:
Windows servers:
0.0.0.0: Anyone can connect (is important for me because of my authentication bot)
27017 Port is open
With another Ubuntu server it runs without problems.
Nothing has been done. no updates or anything else…
Even if I whitelist my IP as the error message says, it doesn’t work…