question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skipping oplog entry: '<db_name>.tmp.agg_out.1' is not in the namespace configuration.

See original GitHub issue

Wanted to report an issue and give my fix.

I have a collection that I am trying to dump into Elasticsearch while renaming it so that the db collection name is used for the ES index name and type. However, I got the following log message (10s of thousands of times):

2017-04-10 14:56:43,809 [DEBUG] mongo_connector.oplog_manager:175 - OplogThread: Skipping oplog entry: 'production.tmp.agg_out.1' is not in the namespace configuration.

Here is my config file with the desired namespaces handling

{
"mainAddress": "db-address.7495.mongodbdns.com:27000",
"oplogFile": "oplog.timestamp",
"noDump": true,
"batchSize": -1,
"verbosity": 3,
"continueOnError": false,

"logging": {
    "type": "file",
    "filename": "mongo-connector.log"
},

"authentication": {
    "adminUsername": "app-admin",
    "passwordFile": "mongo-connector.pwd"
},

"namespaces": {
    "production.test": {
        "rename" : "tests.test"
    }
},

"docManagers": [
    {
        "docManager": "elastic2_doc_manager",
        "targetURL": "127.0.0.1:9200",
        "bulkSize": 5000
    }
]
}

After some digging I found that producing a collection from the mongodb aggregation $out stage makes temp collections named like db_name.tmp.agg_out.n. I did in fact produce the test collection from an aggregation with $out. I figured the quickest thing to do was to drop the tmp.agg_out.n collection, but I couldn’t find it!

Instead I did db.repairDatabase() and ran mongo-connector again, which worked without issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ShaneHarveycommented, Apr 10, 2017

noDump causes mongo-connector to start tailing the oplog from the oldest entry. This might be changed to the newest entry in a future release.

I’m going to close this as a duplicate of https://github.com/mongodb-labs/mongo-connector/issues/586 and https://github.com/mongodb-labs/mongo-connector/issues/305.

0reactions
thephysicsriotcommented, Apr 10, 2017

I see. Let me outline what my actual problem is.

When I use noDump: false, the documents dump in a matter of seconds, I get an oplog.timestamp file, and it tails the oplog indefinitely with heartbeat messages. When I use noDump: true (so that I can get a timestamp file alone, I don’t care about dumping atm), it logs all these “skipping” messages of which there are 100s of millions because the imps coll is huge.

That is why I am confused here, noDump: false seems to be getting right to the point and dumping the target collection and noDump: true is running over and skipping a bunch of oplog entries. While I haven’t yet waited more than a few minutes, using noDump: true is taking significantly longer when my expectation, though I am naive to the internals, is that it would take less time.

Am I understanding the purpose of noDump?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monorestore failing while trying to restore oplogdump
I was able to reproduce this bug. Mongorestore cannot properly parse createIndexes or commitIndexes oplog entries if the index being created has ...
Read more >
[TOOLS-2334] Skip system collections during oplog replay
For reference: mongomirror appears to skip all 'config' database entries during both initial sync and oplog replay unless specifically ...
Read more >
Configuration - Monstache
Configuration ¶. Configuration can be specified in environment variables (a limited set of options), in a TOML config file or passed into monstache...
Read more >
Mongorestore for oplog.rs collection is not working - restore ...
I have taken mongodump of oplog.rs collections. ... skipping applying the config.transactions namespace in applyOps ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found