title: how to connect mongodb with replicaset url?
body: <p>I'm using MongoDB with replication(bitnami) on Azure. <br>I have created three mongodb nodes(1 primary ,1 secondary and 1 arbiter).
  When I try to connect with MongoDB connection URI <code>(mongodb://username:password@ip01:27017,ip02:27017,ip03:27017/?readPreference=primary&amp;replicaSet=replicaset)</code>  it gives me error like <code>pymongo.errors.ServerSelectionTimeoutError: 10.0.0.5:27017: timed out,10.0.0.6:27017: [Errno 113] No route to host,10.0.0.4:27017: timed out,10.0.0.7:27017: timed out</code> <br>
  I prefered this <a href="https://docs.bitnami.com/azure-templates/infrastructure/mongodb/" rel="nofollow noreferrer">Official Documentation (Bitnami)</a> for connection url.</p>
  
  <pre><code>connectionString = "mongodb://root:Root123@*.*.*.*:27017,*.*.*.*:27017,*.*.*.*:27017/?replicaSet=replicaset"
  client= MongoClient(connectionString)
  db = client['mongo_collection']
  data = db.xyz.find({"x": 10})
  for d in data:
      print d
  </code></pre>