How do I troubleshoot connectivity failures between AWS DMS and a MongoDB source endpoint?

3 minutos de lectura
0

The connectivity between my AWS Database Migration Service (AWS DMS) replication instance and my MongoDB source endpoint fails with "Test Endpoint failed" errors.

Short description

The following errors can cause a MongoDB source endpoint to fail to connect:

  • Connection timeout calling
  • Connection refused calling
  • Authentication failed
  • Libmongoc version

Resolution

Connection timeout calling

When an AWS DMS replication instance can't connect to a MongoDB database, you receive the following error message:

"Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to create new client connection Failed to connect to database., Application-Detailed-Message: Error verifying connection: 'No suitable servers found (`serverSelectionTryOnce` set): [connection timeout calling ismaster on 'mongodbtest.us-west-2.compute.amazonaws.com:27017']' Failed to connect to database."

Typically, configuration issues in the security groups, network access control lists (network ACLs), or on-premises firewalls and IP address tables cause connection timeouts. To resolve this issue, confirm that your network is configured to meet the connectivity requirements for AWS DMS replication instances.

Connection refused calling

When the bindlp settings on the MongoDB instance don't allow connection requests from the AWS DMS replication instance, you receive the following error message:

"Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to create new client connection Failed to connect to database., Application-Detailed-Message: Error verifying connection: 'No suitable servers found (`serverSelectionTryOnce` set): [connection refused calling ismaster on 'mongodbtest.us-west-2.compute.amazonaws.com:27017']' Failed to connect to database."

To resolve this issue, modify the bindIp configuration on the MongoDB instance to allow connections from replication instances. For more information, see IP Binding on the MongoDB website.

Authentication failed

When the credentials that you provide aren't valid, you receive the following error message:

"Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to create new client connection Failed to connect to database., Application-Detailed-Message: Error verifying connection: 'Authentication failed.' Failed to connect to database."

Credentials that aren't valid include the following:

  • Incorrect username or password in the endpoint
  • Incorrect authentication source database name in the Username field
  • A special character in your password that MongoDB doesn't accept

To resolve this issue, confirm that you're using the correct authentication credentials. Connect to the MongoDB database with the same username and password that you entered in the endpoint. For more information, see Creating source and target endpoints.

Libmongoc version

When you use a version of MongoDB that isn't supported for AWS DMS replication, you receive the following error:

"Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to create new client connection Failed to connect to database., Application-Detailed-Message: Error verifying connection: 'Server at ec2-35-166-73-109.us-west-2.compute.amazonaws.com:27017 reports wire version 2, but this version of libmongoc requires at least 3 (MongoDB 3.0)' Failed to connect to database."

To resolve this issue, upgrade the source MongoDB database to a version of MongoDB that AWS DMS supports.

Related information

Using MongoDB as a source for AWS DMS

How can I troubleshoot AWS DMS endpoint connectivity failures?

OFICIAL DE AWS
OFICIAL DE AWSActualizada hace 3 meses
2 comentarios

I am facing similar issue and I haven't use / in target endpoint URL. Please suggest.

respondido hace 10 meses

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERADOR
respondido hace 10 meses