Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2877

"pymongo.errors.ServerSelectionTimeoutError:" error from using djongo engine

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Community Answered
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Background: I was connecting to a mongodb.com instance using ipython at first but then I starting using djongo (which using pymongo) with django. Using the same creds this does not work.

      These are the lib versions that I am using:

      • django 2.2.10
      • djongo 1.2.3
      • pymongo 3.12.0

      Settings.py file in django project
      DATABASES = {
      'default': {
      'ENGINE': 'djongo',
      'NAME': ENV('MONGO_DBNAME'),
      'ENFORCE_SCHEMA': False,
      'CLIENT': {
      'host': ENV("MONGO_HOST"),
      # 'port': int(ENV("MONGO_DBPORT")),
      'username': ENV("MONGO_USER"),
      'password': ENV("MONGO_PASS"),
      'authSource': ENV('MONGO_DBNAME'),
      'authMechanism': 'SCRAM-SHA-1',
      "waitQueueTimeoutMS": 60000, # how many milsec to wait for timeout
      "ssl": True,
      },
      'LOGGING': {
      'version': 1,
      'loggers': {
      'djongo': {
      'level': 'DEBUG',
      'propagate': False,
      }
      },
      },
      }
      {color:#d4d4d4}}
       

      Full Error:

      pymongo.errors.ServerSelectionTimeoutError: [Errno 8] nodename nor servname provided, or not known, Timeout: 30s, Topology Description: <TopologyDescription id: 6124052c370971661d43d6bf, topology_type: Single, servers: [<ServerDescription (server_type: Unknown, rtt: None, error=AutoReconnect([Errno 8] nodename nor servname provided, or not known')>]>

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              prashant.mital Prashant Mital (Inactive)
              Reporter:
              dsaunders@cloudbees.com Deon Saunders
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: