[SERVER-14883] MongoDB replication does not work with authentication. Created: 13/Aug/14 Updated: 10/Dec/14 Resolved: 14/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.2.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vinod Sugur | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | Start mongod instance: mongod --dbpath d:\data From mong client create user: db.addUser("u","p") Stop the server and restart it with following options mongod --dbpath d:\data --auth --replSet "rs0" Execute following from mongo client with/without authentication rs.initiate() |
| Participants: |
| Description |
|
We have standalone MongoDB server which has authentication service enabled. We want to query oplog.rs collection to implement certain feature. When we try to enable replication we get following error. (code) > db.isMaster() On server following error is observed: invalid parameter: expected an object () If we disable authentication then replication works fine. please suggest. |
| Comments |
| Comment by Spencer Brody (Inactive) [ 14/Aug/14 ] |
|
Great! Glad to hear it. |
| Comment by Vinod Sugur [ 14/Aug/14 ] |
|
I configured mongod instance using keyFile and it is working fine. |
| Comment by Spencer Brody (Inactive) [ 13/Aug/14 ] |
|
Looks like you have not provided a keyFile which is needed so that the nodes in the replica set can authenticate to each other. See this tutorial for more information on deploying a replica set with access control enabled. |