When initializing MongoDB replica sets on Azure dev i get following error:
Command ‘replSetInitiate’ failed: local.oplog.rs is not empty on the initiating member. cannot initiate. (response: { “errmsg” : “local.oplog.rs is not empty on the initiating member. cannot initiate.”, “ok” : 0.0 })
I have tried cleanup localstorage on recycle, but it does not help.
I used source that provided by 10gen: source code and blog post
UPDATE:
That error appear in console after calling RunInitializeCommandLocally method (happens for each ReplicaSetRole)
Then i try to create MongoServer and each instance in it has Disconnected state.
There was no problem at all. This exception is normal behavior. Just need to wait couple of seconds and replica set will be initialized.
Note: use mongo.exe to check status of replica set.