naresh nandu
naresh nandu

Reputation: 137

In slave Mongodb 3.0.1, when I run "show dbs" command I'm getting the below error

After clustering the Mongodb 3.0.1 in two machines. In slave mode when I run this command "show dbs" it is showing "not master" error.

Here is the error:

E QUERY Error: listDatabases failed: 
        { "note" : "from execCommand", "ok" : 0, "errmsg" : "not master" }
at Error (<anonymous>)

Please tell me, how can I overcome this problem.

Upvotes: 4

Views: 4798

Answers (1)

user2941651
user2941651

Reputation:

Please use rs.slaveOk() on the mongo console you are getting the error.

Upvotes: 15

Related Questions