Troubleshooting MongoDB OpLog Connection

If you are unable to set up MongoDB using OpLogs, please verify the checklist below. You should use your auth DB to run the following commands. Additionally, you should have a root role in auth DB. In order to log into your mongo shell, please refer to the commands below. Ensure that you substitute contents in ‘<>’ (angle brackets).

mongo <host.com>:<port>/<database> -u <username> -p --authenticationDatabase <auth_db>
  1. Run the following command to switch to auth DB

    use <auth db>
    
  2. Verify the user has ‘read role’ on both local DB and the DB intended to be read. Run the following command in Mongo shell.

     db.getUser("<db user>").roles
    

The expected output would be:

[{  
   "role" : "read",  
   "db" : "local"  
 }, {  
   "role" : "read",  
   "db" : "<db to replicate>"  
}]

Hevo requires the following privileges from the user if you are not provisioning a complete “read” role. The privileges are as follows:

"find", "listCollections", "listIndexes"
Last updated on 06 Aug 2020