Troubleshooting MongoDB OpLog Connection

Last updated on Oct 21, 2022
On This Page

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


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Sep-05-2022 NA Brought this page under its respective Source documentation folder.
Oct-04-2021 1.73 New document.

Tell us what went wrong