Error: $MONGO_OPLOG_URL must be set to the 'local' database of a Mongo replica set


I am setting up a server with mongodb and node to deploy a meteor project. I can’t figure out how to configure mongo to enable oplog tailing.

This is the error I get when starting ‘bundle/main.js’

Error: $MONGO_OPLOG_URL must be set to the 'local' database of a Mongo replica set
at Error (<anonymous>)
at [object Object]._.extend._startTailing (packages/mongo/oplog_tailing.js:221:1)
at new OplogHandle (packages/mongo/oplog_tailing.js:81:1)
at new MongoConnection (packages/mongo/mongo_driver.js:216:1)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:1)
at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:1)
at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
at new Mongo.Collection (packages/mongo/collection.js:98:1)
at packages/accounts-base/accounts_common.js:141:1
at /meteor/microscope0/bundle/programs/server/packages/accounts-base.js:243:4

I have tried enabling the oplog by adding this to mongod.conf:

master = true

but it didn’t work…, setting a replSet as follows doesn’t work either:


My oplog url is set as follows:


My mongod.conf file doesn’t enable authentication.

The error is emitted from this file: oplog_tailing.js, which indicates the master/replset is not configured ok.

How can I configure a configure a stand-alone mongo server for oplog tailing?


Did you ever figure this out?


I had trouble with this too, so much that I thought it was a bug until I was proven wrong :slight_smile:

See for a good walkthrough by @abernix.