[ mongodb ] `not master and slaveOk=false` in mongo client

ProblemĀ 

E QUERY Error: error: { "$err" : "not master and slaveOk=false", "code" : 13435 }
at Error (<anonymous>)
at DBQuery.next (src/mongo/shell/query.js:259:15)
at DB._getCollectionInfosSystemNamespaces (src/mongo/shell/db.js:619:25)
at DB.getCollectionInfos (src/mongo/shell/db.js:662:17)
at DB.getCollectionNames (src/mongo/shell/db.js:669:17)
at shellHelper.show (src/mongo/shell/utils.js:625:12)
at shellHelper (src/mongo/shell/utils.js:524:36)
at (shellhelp2):1:1 at src/mongo/shell/query.js:259

Solution

rs.slaveOk()

NOTE : k is lower capital letter

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s