-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.3, 1.4
-
Component/s: None
-
Empty show more show less
When we try to run an admin command such as replSetGetStatus on an arbiter, the node driver returns an error "Cannot write to an arbiter", despite the fact this is a read operation, not a write. The mongo shell is able to run `rs.status()` on the arbiter OK, so we know it is possible to run.
I believe this is an error in lib/mongodb/connection/server.js in canCheckoutReader. The code says:
{{
var canCheckoutReader = function(self) {
// We cannot write to an arbiter or secondary server
if(self.isMasterDoc && self.isMasterDoc['arbiterOnly'] == true)
Which I believe means the node driver will never allow any read operations, admin or not, from an arbiter.
This is a problem for us as we are using direct connections to each machine in the replset to do monitoring. We want to get what each machine thinks the status of the cluster is, but can't get any info from the arbiters.