[SERVER-6942] Will mongooplog tool work against servers that require authentication? Created: 05/Sep/12  Updated: 24/Jun/14  Resolved: 06/Sep/12

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Nadeem Shabir Assignee: Michael O'Brien
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates TOOLS-173 mongooplog needs correct options (aut... Closed
Participants:

 Description   

Ive been trying to use the mongooplog tool to replay operations from a live running replica set we have into a local db.

However it keeps failing with:

Wed Sep 5 07:39:27 creating new connection to:127.0.0.1:27017
Wed Sep 5 07:39:27 BackgroundJob starting: ConnectBG
Wed Sep 5 07:39:27 connected connection!
connected to: 127.0.0.1
Wed Sep 5 07:39:27 [oplogreplay] going to connect
Wed Sep 5 07:39:27 BackgroundJob starting: ConnectBG
Wed Sep 5 07:39:27 [oplogreplay] connected
Wed Sep 5 07:39:27 [oplogreplay] starting from Sep 4 07:39:27:0
Wed Sep 5 07:39:27 [oplogreplay] repl: local.oplog.rs.find({ ts:

{ $gte: new Date(5784331245513080832) }

})
Wed Sep 5 07:39:27 [oplogreplay]

{ $err: "unauthorized db:local ns:local.oplog.rs lock type:0 client:80.169.144.162", code: 10057 }

Wed Sep 5 07:39:27 [oplogreplay] error getting oplog
Wed Sep 5 07:39:27 [oplogreplay]

{ $err: "unauthorized db:local ns:local.oplog.rs lock type:0 client:80.169.144.162", code: 10057 }

I then realised looking back at the documentation for mongooplog (http://docs.mongodb.org/manual/reference/mongooplog/) that

If the mongod instance specified by the --from argument is running with authentication, then mongooplog will not be able to copy oplog entries.

Firstly just to be sure: is this the reason why its failing for me?

Secondly is this likely to be changed in the future? so that you can use it against a mongod instance that requires authentication?

Thanks
Nadeem



 Comments   
Comment by Brett Cave [ 24/Jun/14 ]

would like to vote for this issue, but am unable to - would be useful to be able to replay oplog from a server with authentication enabled.

Comment by Daniel Pasette (Inactive) [ 06/Sep/12 ]

As you have referenced in the documentation, mongooplog does not work when the --from host requires authentication. This is the cause of your failure.

You can watch/vote for the issue which describes this feature: SERVER-6153

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