I am trying to bring up a 3 node replicaSet using rs.initiate().
It is not working every time, I am getting the following timeout error.
raise ServerSelectionTimeoutError((self._error_message(selector), timeout, self.description))E pymongo.errors.ServerSelectionTimeoutError: No replica set members match selector "Primary()", Timeout: 30s, Topology Description: <TopologyDescription id: 612dbc413af5ded662893f8b, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('10.15.4.73', 27017) server_type: RSGhost, rtt: 0.0014995487034320835>]>
I have few questions here:
- Why does the rs.initiate() is taking so much time? (I am waiting for rs.initiate for around 200 seconds).
- Is it the election process that is taking more time as part of rs.initiate() ?
- Typically how much time rs.initiate() will take.
- How can we decrease the amount time rs.initiate() is taking?
Any help will be highly appreciated.