MongoDB Documentation, Release 3.0.4 replSet error fatal couldn't query the local local.oplog.rs collection. Terminating mongod <timestamp> [rsStart] bad replSet oplog entry? Oplog Entry Timestamp Error Example Duplicate Key Error on local.slaves MongoDB 3.0.0 removes the local.slaves (page 654) collection. For local.slaves error in earlier versions of MongoDB, refer to the appropriate version of the MongoDB Manual. Changed in version 3.0.0. Chapter 9. Replication 650 Modify the timestamp values as needed based on your oplog entry. This operation may take some period to complete because the update must scan and pull the entire oplog into memory. To set the proper type for this value and resolve this issue, use an update operation that resembles the following: db.oplog.rs.update( { ts: { t:1347982456000, i:1 } }, { $set: { ts: new Timestamp(1347982456000, 1)}}) Then the value for the ts field in the last oplog entry is of the wrong data type. And the second query returns this as the last entry where ts has the Timestamp type: If the first query returns this as the last oplog entry: The first query returns the last document in the oplog, while the second returns the last document in the oplog where the ts value is a Timestamp. The $type operator allows you to select BSON type 17, is the Timestamp data type. If the queries don’t return the same document, then the last document in the oplog has the wrong data type in the ts field. Check the type of the ts value using the following two queries against the oplog collection: Often, an incorrectly typed value in the ts field in the last oplog entry causes this error. The correct data type is Timestamp. Consider the following error in mongod output and logs: db = db.getSiblingDB("local") db.oplog.rs.find().sort({$natural:-1}).limit(1) db.oplog.rs.find({ts:{$type:17}}).sort({$natural:-1}).limit(1) { "ts" : {t: 1347982456000, i: 1}, "h" : NumberLong("8191276672478122996"), "op" : "n", "ns" : "", "o" : { "msg" : "Reconfig set", "version" : 4 } } { "ts" : Timestamp(1347982454000, 1), "h" : NumberLong("6188469075153256465"), "op" : "n", "ns" : "", "o" : { "msg" : "Reconfig set", "version" : 3 } }