skip to Main Content

I’m trying to replicate data from MongoDB Atlas into an S3 data lake (not mongo’s data lake) using AWS Data Migration Services, but I’m getting this error:

Failed to establish a connection to MongoDB using the following parameters: ‘mongodb://mongodb+srv://[theUsername]:[thePassword]@[theServer].mongodb.net:27017/?retryWrites=false’

I’m putting this as the Server Name, and DMS is automagically adding the port number from a separate field in DMS and the retryWrites param at the end:

mongodb+srv://[theUsername]:[thePassword]@[theServer].mongodb.net

Anyone successfully used Atlas as a source endpoint?

3

Answers


  1. Chosen as BEST ANSWER

    Sadly, the response from my devops folks was "due to our network config this will never work."


  2. Try extracting server, username, and password from the connection string of MongoDB and put these fields separately during endpoint creation.

    Login or Signup to reply.
  3. Good afternoon,

    I was able to successfully configure the connection between DMS and MongoDB-Atlas. Both publicly and privately.

    As of today, DMS does not officially support MongoDB-Atlas.

    For the connection to work, it will be necessary to specify the MongoDB-Atlas primary endpoint in the connection.

    Example (endpoint settings):

    {
         "Username": "username",
         "ServerName": "primary-endpoint.mongodb.net",
         "Port": 1012,
         "DatabaseName": "dbname",
         "AuthType": "password",
         "AuthMechanism": "scram-sha-1",
         "NestingLevel": "none",
         "ExtractDocId": "false",
         "AuthSource": "admin"
    }
    

    Important: The default port changes. Check the port.

    To find the endpoints and ports, run the script:
    https://www.mongodb.com/developer/products/mongodb/srv-connection-strings/

    Finally, enable SSL as Require.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search