mongodb, replicates and error: { “$err” : “not master and slaveOk=false”, “code” : 13435 }
You have to set “secondary okay” mode to let the mongo shell know that you’re allowing reads from a secondary. This is to protect you and your applications from performing eventually consistent reads by accident. You can do this in the shell with: rs.secondaryOk() After that you can query normally from secondaries. A note about … Read more