Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4847

Cannot connect to deployment that does not whitelist client's IP address

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.5
    • Component/s: Dev Exp
    • None
    • Environment:
      Local docker image of a Debian machine that connects to an external mongodb Atlas instance.

      Hello, dear MongoDB team,

      So we've tried to migrate our app from DynamoDB to MongoDB by making use of MongoDB Atlas, however we have issues connecting to the instance due to the error

      Mongo::Error::NoServerAvailable (No primary server is available in cluster: #<Cluster topology=Unknown[consproddb-shard-00-00-2xz3s.mongodb.net:27017,consproddb-shard-00-01-2xz3s.mongodb.net:27017,consproddb-shard-00-02-2xz3s.mongodb.net:27017] servers=[#<Server address=consproddb-shard-00-00-2xz3s.mongodb.net:27017 UNKNOWN>,#<Server address=consproddb-shard-00-01-2xz3s.mongodb.net:27017 UNKNOWN>,#<Server address=consproddb-shard-00-02-2xz3s.mongodb.net:27017 UNKNOWN>]> with timeout=3, LT=0.015)
      

      However Atlas clearly shows a primary server: https://dsh.re/f0a83

      We get this error by both using an uri string or db + username + password + host inside mongoid.yml.

      We cut the configuration to the bare minimum but still the problem persists.

      development:
        clients:
          default:
            uri: mongodb+srv://USERNAME:PASSWORD@HOST/DATABASE?retryWrites=true&w=majority

      Please, let us know if you need further information

      Patryk

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            patryk.kotarski@iubenda.com Patryk Kotarski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: