Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51139

Can't connect to mongodb.Could not connect to any servers in your MongoDB Atlas cluster

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    Description

      while trying to connect with mongodb i'm getting this error :
       
      {{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:\Node-Jonas\Node-Projects\node_modules\mongoose\lib\connection.js:828:32)
      at Mongoose.connect (D:\Node-Jonas\Node-Projects\node_modules\mongoose\lib\index.js:335:15)
      at Object.<anonymous> (D:\Node-Jonas\Node-Projects\server.js:21:4)
      at Module._compile (internal/modules/cjs/loader.js:1138:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
      at Module.load (internal/modules/cjs/loader.js:986:32)
      at Function.Module._load (internal/modules/cjs/loader.js:879:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
      at internal/main/run_main_module.js:17:47 {
      reason: TopologyDescription {
      type: 'ReplicaSetNoPrimary',
      setName: null,
      maxSetVersion: null,
      maxElectionId: null,
      servers: Map

      { 'cluster0-shard-00-00-g4ttz.mongodb.net:27017' => [ServerDescription], 'cluster0-shard-00-01-g4ttz.mongodb.net:27017' => [ServerDescription] }

      ,
      stale: false,
      compatible: true,
      compatibilityError: null,
      logicalSessionTimeoutMinutes: null,
      heartbeatFrequencyMS: 10000,
      localThresholdMS: 15,
      commonWireVersion: null
      }
      }}}

      i already whitelisted my ip but still getting the problem.also can't connect to compass. it was all fine even yesterday and so don't know why all of suuden this problem occured.need help.Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            myth.saziv@gmail.com myth saziv
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: