When pulling data from a MongoDb in a replica set, the error ' "$err" : "not master and slaveOk=false"' is seen

Solution Verified - Updated -

Issue

When attempting to pull data from a Mongo database that is a member of a replica set, the following error is seen:

uncaught exception: error: { "$err" : "not master and slaveOk=false", "code" : 13435 }

Environment

  • MongoDb Replica Set
  • OpenShift Enterprise 1.1
  • OpenShift Enterprise 1.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content