When trying to access MongoDB database collection data using command such as show collections on one of the secondary member of the replica set, error message such as not master and slaveOk=false occurs. Following screenshot represents the same:
Following command when executed on secondaries resolves the above shown error:
rs.slaveOk();
Latest posts by Ajitesh Kumar (see all)
- MSE vs RMSE vs MAE vs MAPE vs R-Squared: When to Use? - April 22, 2024
- Gradient Descent in Machine Learning: Python Examples - April 22, 2024
- Loss Function vs Cost Function vs Objective Function: Examples - April 19, 2024
Leave a Reply