Troubleshooting MongoDB OpLog Connection

If you are unable to set up MongoDB using OpLogs, please verify the checklist below. You must use your auth DB to run the following commands. Additionally, you must have a root role in auth DB.

Use the following command to log in to you mongo shell. Ensure that you substitute the variables in ‘<>’ (angle brackets) with the actual values.

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:

"find", "listCollections", "listIndexes"

See Also

Last updated on 12 Oct 2021