I use a replicaset with two nodes (primary and secondary) and 1 arbiter (total 3). Sometimes I get the message "ERROR when connecting to the database. Error: Error: No valid replicaset instance servers were found." I can not reproduce (how this happens on its own, and sometimes very often). I added server.on ('error',) for debugging, but sometimes in my local environment it prints something like printing connection error 1 member node name (although I don't know if this is due to my problem). When I connect to one of the instances via the mongo shell and check rs.status (), I get everything in order, all members are healthy and above.
Link to Jira for the above question:
https://jira.mongodb.org/browse/NODE-296
Shobhit mishra
source share