mongodb network_error ai_generated true

MongoServerSelectionError: connection refused by Atlas IP whitelist

ID: mongodb/atlas-connection-whitelist

Also available as: JSON · Markdown
88%Fix Rate
90%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7 active

Root Cause

MongoDB Atlas rejected connection from non-whitelisted IP.

generic

Workarounds

  1. 92% success Add current IP to Atlas Network Access whitelist
  2. 88% success Use VPC peering or private endpoints for production

Dead Ends

Common approaches that don't work:

  1. Allow all IPs 0.0.0.0/0 82% fail

    Security vulnerability

  2. Whitelist dynamic IPs individually 75% fail

    Breaks on IP change