hi!
i have replica set with 3 secondary in one VPC1 and 4-th secondary hidden member in another VPC2 in subnet1. There is a peering connection between vpc`s (only for vpc2 subnet1)
Connection to hidden from VPC2 subnet1 establish fine.
But if i try connection from vpc2 subnet2 to hidden member (for vpc2 subnet2 visible only vpc2 subnet1) catch error:
File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/topology.py", line 201, in select_servers
selector, server_timeout, address)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/topology.py", line 218, in _select_servers_loop
(self._error_message(selector), timeout, self.description))
pymongo.errors.ServerSelectionTimeoutError: No replica set members match selector "Primary()", Timeout: 3.0s, Topology Description: <TopologyDescription id: 6205bf04e1315e98211bed68, topology_type: ReplicaSetNoPrimary, servers: [
try connection strings:
mongodb://user:password@192.168.0.1:27017/?authSource=db&readPreference=secondary
mongodb://user:password@192.168.0.1:27017/?authSource=db&replicaSet=rs&readPreference=secondary
is it capable connect to hidden if primary is invisible for client?