Closed TheDigitalNinja closed 11 years ago
Hm, this should definitely have a better error message.
Is your mongo server running as part of a replica set? You need to run mosql against a replica set, as documented here: http://docs.mongodb.org/manual/replication/
This was a bit confusing for me at first, too, since it says is not a replset. Proceeding anyways...
. I just didn't realize it was a requirement until I looked at the source and saw the ['local']['oplog.rs']
reference. That said, a single import should be possible whether or not you are using a replset, so it might be something to consider.
Yeah, the intent when I made that a warning was to support doing imports against a non-replSet, but I never actually implemented it. I'll update this ticket to track the fact that that should be possible.
I've added a quick patch to handle this for development work (just running a single mongo instance locally) here https://github.com/andrewjshults/mosql/tree/non-replicate-set
There's probably a cleaner way of doing this (it should probably exit after the initial import if not connected to a replica set), but this has worked so far.
If you try to run it against a replset, it will warn, try to continue anyways, and die with