Hi,
I can't connect to my replica pymongo primary.
from pymongo import MongoClient, ReadPreference
conn = MongoClient('mongodb://user:pass#@hmaster:20017/admin' ,connect=False, replicaSet='Replic', read_preference=ReadPreference.PRIMARY)
config =
{'_id': 'perconaReplic', 'members': [ \{'_id': 0, 'host': 'HMaster:20017'},
{'_id': 1, 'host': 'HMaster:40018'},
{'_id': 2, 'host': 'HMaster:40019'}]}
conn.admin.command('replSetInitiate', config)
ServerSelectionTimeoutError: No replica set members match selector "Primary()"
through the shell I usually connect.