Showing posts with label mongodb database list and collection is not visible. Show all posts
Showing posts with label mongodb database list and collection is not visible. Show all posts

Thursday, June 8, 2017

Mongodb secondary database - database list and collection is not visible

MongoDB secondary replica does not have collections as in primary

Error : 
"$err" : "not master and slaveOk=false", "code" : 13435

Solution :
serverdb:SECONDARY> rs.slaveOk()

Running Command rs.slaveOk() on secondary instance is the solution.