[SERVER-22507] E QUERY [thread1] Error: not master and slaveOk=false : Created: 08/Feb/16 Updated: 08/Feb/16 Resolved: 08/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Sarkhan Allahverdiyev [X] | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Hello, I am new user in MongoDB. When i query db.getUsers() get following error. How can i resolve this problem? rs0:SECONDARY> db.getUsers() |
| Comments |
| Comment by Ramon Fernandez Marina [ 08/Feb/16 ] |
|
Sarkhan, you'll need to run rs.slaveOk() to read from a secondary. Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. Regards, |