본문 바로가기

Tech/[Trouble Shooting] Logs

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.

Hi, There!
안녕하세요, 바오밥입니다.


목차

  1. 문제
  2. 솔루션
  3. Reference

문제

기존 맥북에서 개발하던 소스를 깃을 통해 윈도우 PC에서 개발하려고 하였는데 아래와 같은 오류가 발생하였습니다.

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.


솔루션

몽고 DB 사이트에서 연결하고자 하는 PC의 IP를 추가해 줍니다.

윈도우의 경우 cmd 창에서 ipconfig를 통해 자신의 IP를 조회할 수 있습니다.

 

IP를 추가한 다음 (includes your current IP address) 이 옆에 있다면, 정상적으로 자신의 IP 추가된 것입니다.