[SERVER-5233] Mongodump stdout not working with authentication Created: 06/Mar/12  Updated: 11/Jul/16  Resolved: 07/Jun/12

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 1.8.2
Fix Version/s: 2.1.2

Type: Bug Priority: Major - P3
Reporter: Charles Chen Assignee: Daniel Pasette (Inactive)
Resolution: Done Votes: 3
Labels: mongodump
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

unix, macosx


Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

dumping a collection using mongodump with option --out - gives an error.

Steps i took:

mongodump --db test -u username -p Password -h mymongodatabase.onthecloud:12888 -vvvvv --collection posts --out -

displays the error:
Wed Feb 29 21:48:13 creating new connection
to:mymongodatabase.onthecloud:12888
Wed Feb 29 21:48:13 BackgroundJob starting: ConnectBG
Wed Feb 29 21:48:13 connected connection!
connected to: mymongodatabase.onthecloud:12888
Wed Feb 29 21:48:13 nextSafe():

{ $err: "unauthorized db:test lock type:-1 client:10.3.55.10", code: 10057 }


Wed Feb 29 21:48:13 User Assertion: 13106:nextSafe():

{ $err: "unauthorized db:test lock type:-1 client:10.3.55.10", code: 10057 }


assertion: 13106 nextSafe():

{ $err: "unauthorized db:test lock type:-1 client:10.3.55.10", code: 10057 }

'

however when i remove '--out -', it will dump out the collection fine. I've tested this on 1.8.2 and the lastest version 2.0.3.

I also tested this on my local mongo which does not have authentication (testing it with the option '--out -') and that works fine. Im guessing somethings wrong with authentication?



 Comments   
Comment by auto [ 25/May/12 ]

Author:

{u'login': u'', u'name': u'Brandon Diamond', u'email': u'brandon@10gen.com'}

Message: SERVER-5233: fix mongodump with authentication + test
Branch: master
https://github.com/mongodb/mongo/commit/9739a5516610bbe2943d9e525b204254df9a559a

Comment by Brandon Diamond [ 25/May/12 ]

Code review created for code change (already reviewed above) and test:

http://codereview.10gen.com/7963022

Comment by Brandon Diamond [ 17/Apr/12 ]

Issue reproduced in HEAD. Investigating possible causes/fixes.

Generated at Thu Feb 08 03:08:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.