Can't connect with MONGO_OPLOG_URL


#1

I think, I’m having trouble getting oplog working but it seems like only on staging. I read this aritlce before I started.

I’m using mlab to host my mongodbs. I have a cluster with the shared plan. One for production and one for development. I following the mlab instructions and for oplog I point to local yet use the admin for auth (I have an admin user set up for read only). I set them both up the same, but only prod is working

I’m pointing my local box and my staging EC2 instance at development at one cluster, and production at the other. I just set this all up yesterday, so I might have missed something.

Here is the livedata

On Production:

Here it seems to be working, as I have drivers-oplog and drivers-polling.

On staging:

only drivers-oplog no drivers-polling.

Here’s my staging env (I got all these settings from mlabs, they post the url drivers by the database):

 "env": {
    "PORT": "80",
    "ROOT_URL": "http://staging.my-site.com",
    "MONGO_URL": "mongodb://admin:password@ds77777-a0.mlab.com:77777,ds77777-a1.mlab.com:77777/developer?replicaSet=rs-ds77777",
    "MONGO_OPLOG_URL": "mongodb://oplog-reader:password@ds77777-a0.mlab.com:77777,ds77777-a1.mlab.com:77777/local?replicaSet=rs-ds77777&authSource=admin" 
  },

production (working):

  "env": {
    "PORT": "80",
    "ROOT_URL": "http://prod.my-site.com", // change to https
    "MONGO_URL": "mongodb://admin:password@55555-a0.mlab.com:55555,ds55555-a1.mlab.com:55555/production?replicaSet=rs-ds55555",
    "MONGO_OPLOG_URL": "mongodb://oplog-reader:password@ds55555-a0.mlab.com:55555,ds55555-a1.mlab.com:55555/local?replicaSet=rs-ds55555&authSource=admin" 
  },

If I try to connect to the cluster with oplog set via my local dev box, my application reverts back to my local db (doesn’t connect):

$ MONGO_URL=mongodb://username:password@ds155999-a0.mlab.com:155999,ds155999-a1.mlab.com:155999/developer?replicaSet=rs-ds155999 MONGO_OPLOG_URL=mongodb://oplog-reader:password@ds155999-a0.mlab.com:155999,ds155999-a1.mlab.com:155999/local?replicaSet=rs-ds155999&authSource=admin meteor run --port 3000 --settings .config/development/settings.json

But if I remove oplog it connects to the remote source just fine:

$ MONGO_URL=mongodb://username:password@ds155999-a0.mlab.com:155999,ds155999-a1.mlab.com:155999/developer?replicaSet=rs-ds155999  meteor run --port 3000 --settings .config/development/settings.json

Food for thought: Is there a situation that triggers OPLOG to initiate? For example, could the fact that I’m on a Development box, and am not really pushing it cause OPLOG to not kick in somehow? Also, could there be a restriction on my accessing the OPLOG cluster from my local box?

Also, I’m kinda running blind here. I’m connected to this Development mlab cluster from my Staging server and my local development box. Could there be error logs somewhere to help?

UPDATE:

In this how-to to this article, I’m confused by this sentence:

“Now look at your app. The facts template will render a variety of metrics; the ones we’re looking for are observe-drivers-oplog and observe-drivers-polling in the mongo-livedata section. If observe-drivers-polling is zero or not rendered at all, then all of your observeChanges calls are using OplogObserveDriver”.

Does this actually mean that STAGING is working and PRODUCTION is NOT based on the screenshots?