Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Cant read off slaves #79

Open
thestevebest opened this issue Jun 26, 2014 · 1 comment
Open

Cant read off slaves #79

thestevebest opened this issue Jun 26, 2014 · 1 comment

Comments

@thestevebest
Copy link

Greetings, I would like to use RockMongo to allow our Product team to run analytics on a hidden replica attached to our production replica set.

However, I keep getting the following error:

not master and slaveOk=false

I did some Google'ing and it looks like some folks had some workarounds with setSlaveOkay(true) in app/models/MServer.php, but nothing seems to be working. Any help would be extremely appreciated.

Thanks!

@fgm
Copy link

fgm commented Jul 20, 2015

This happens because you have a version of the Mongo extension including MongoClient, in which case RockMongo instantiates MongoClient, instead of Mongo, and MongoClient does not carry the deprecated setSlaveOkay() method, but expected use of setReadPreference(). PR is #110 .

fgm added a commit to fgm/rockmongo that referenced this issue Jul 20, 2015
- use setReadPreference() instead of setSlaveOkay().
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants