개발 🐾/Error
[MongoDB] MongooseServerSelectionError
JOTOKKI
2021. 1. 18. 19:46
728x90
- 에러 내용
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 (D:\_personal\____study\reactstudy-fullstack\backend\node_modules\mongoose\lib\connection.js:832:32)
at D:\_personal\____study\reactstudy-fullstack\backend\node_modules\mongoose\lib\index.js:345:10
at D:\_personal\____study\reactstudy-fullstack\backend\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at Mongoose._promiseOrCallback (D:\_personal\____study\reactstudy-fullstack\backend\node_modules\mongoose\lib\index.js:1135:10)
at Mongoose.connect (D:\_personal\____study\reactstudy-fullstack\backend\node_modules\mongoose\lib\index.js:344:20)
at Object.<anonymous> (D:\_personal\____study\reactstudy-fullstack\backend\index.js:9:10)
설정된 IP주소가 달라서 생기는 문제.
MongoDB site >> Security >> Network access 에서 현재PC의 IP를 직접 추가하면된다.
반응형