๊ฐœ๋ฐœ ๐Ÿพ/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๋ฅผ ์ง์ ‘ ์ถ”๊ฐ€ํ•˜๋ฉด๋œ๋‹ค.

 

 

๋ฐ˜์‘ํ˜•