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

pymongo.errors.ServerSelectionTimeoutError: rep2:27017: [Errno 8] nodename nor servname provided, or not known,rep1:27017: [Errno 8] nodename nor servname provided, or not known,10.0.8.4:27017: timed out

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      hi,

      I am working on setting up replica set with 1 primary, 1 secondary and 1 arbiter on Azure Cloud.

      Version : MongoDB Version 3.6.15

      I am having trouble connecting to replica set from python. Python is getting connected to mongodb successfully. find below the response object.

      MongoClient(host=['rep0.centralindia.cloudapp.azure.com:27017'], document_class=dict, tz_aware=False, connect=True, replicaset='vinReplica')

      However, am getting the following error when try to connect to DB and execute some queries.

      pymongo.errors.ServerSelectionTimeoutError: rep2:27017: [Errno 8] nodename nor servname provided, or not known,rep1:27017: [Errno 8] nodename nor servname provided, or not known,private-ip:27017: timed out

      I am struggling with the issue since past couple of days. please help.

      thanks,

            Assignee:
            prashant.mital Prashant Mital (Inactive)
            Reporter:
            ravi.pithadiya@vinculumgroup.com Ravikumar Pithadiya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: