[SERVER-9991] MongoDB 2.4.3 fails to mongorestore test database Created: 21/Jun/13 Updated: 25/Oct/17 Resolved: 28/Jun/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security, Tools |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Derek Crudgington | Assignee: | Andre de Frere |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
mongodb 2.4.3 |
||
| Participants: |
| Description |
Did something change in the versions to not allow this anymore? |
| Comments |
| Comment by Khoa Nguyen [ 25/Oct/17 ] |
|
Hi Everyone, I have the problem: please me advance! |
| Comment by Derek Crudgington [ 28/Jun/13 ] |
|
Yes, and thank you! Can close this. |
| Comment by Andre de Frere [ 28/Jun/13 ] |
|
Hi Derek, My apologies, this ticket was closed prematurely. The authenticationDatabase is a new option in 2.4.x release. There have been a number of changes and improvements to Authentication in MongoDB since 2.2.2, including the addition of roles for Security. In previous versions tools would attempt to authenticate against the admin database if they failed for the database they were being run against. This no longer happens by design. Now the authenticationDatabase option needs to be passed if the user you are using does not have credentials in the database you are working against. You can see more information on that in Documentation for mongorestore under 'authenticationDatabase'. The same is true of all tools since 2.4. Given this, it appears that the database you are restoring to does not have the user credentials included. If this is the case, then the error you are receiving is the expected behaviour. Do you agree with this diagnosis? Kind Regards, |
| Comment by Derek Crudgington [ 28/Jun/13 ] |
|
Uh.. this is not resolved, but OK. You didn't even re produce it (didn't use the same command line options). |
| Comment by Derek Crudgington [ 28/Jun/13 ] |
|
Hi, I think the issue I'm hitting on 2.4.3 is I'm not using "--authenticationDatabase admin". When I specify that then it works. Is this a new option? On 2.2.2 I don't have to specify it. |
| Comment by Andreas Nilsson [ 24/Jun/13 ] |
|
I have have successfully performed mongodump/mongorestore on MongoDB 2.4.3 and 2.4.4 using the following commands: ./mongodump -udumper -ppass --authenticationDatabase admin -dtest The dumper account has the following roles in the admin database: ["readWriteAnyDatabase","userAdminAnyDatabase","dbAdminAnyDatabase"] dacrud, can you double check that the username/password combination exists in the test database for the 2.4.3 instance. If it does can you provide the server logs of the failed authentication. Thanks. |
| Comment by Derek Crudgington [ 21/Jun/13 ] |
|
If I take "auth = true" out of the mongodb.conf it still fails with the auth error on 2.4.3. |