Skip to content

How do I troubleshoot endpoint issues that cause my AWS DMS migration tasks to fail?

5 minute read
0

My AWS Database Migration Service (AWS DMS) task fails during full load and Change Data Capture (CDC) phases, and I get endpoint issues and database-specific errors.

Resolution

Review your endpoint connectivity configuration

To review the connectivity of the source or target endpoint of your task, complete the following steps:

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Migrate or replicate.
  3. Choose Tasks, and then select your task.
  4. In the Details tab, check the replication instance name in the Connectivity and security section to make sure that you're using the correct replication instance.
  5. In the Summary section, select the source or target endpoint to review their endpoint interface.
  6. Choose the Connections tab, and then choose Test Connections.
  7. Choose Replication instance, and then choose Run Test.

If the connectivity test results in the Failed status because of a network configuration, then you get the following timeout error messages:

For Oracle:

'Test Endpoint failed: Application-Status: 1020912, Application-Message: ORA-12170: TNS:Connect timeout occurred OCI connection failure.'

For PostgreSQL:

'Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to connect Network error has occurred, Application-Detailed-Message: RetCode: SQL_ERROR SqlState: 08001 NativeError: 101 Message: '

For Amazon DocumentDB (with MongoDB compatibility):

'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'

To resolve this issue, see How do I troubleshoot AWS DMS endpoint connectivity failures? Then, test the connection again.

Review endpoint authentication configuration

The connectivity test of the AWS DMS endpoint might show an authentication error message. To troubleshoot an authentication error message, check that you correctly configured the access to your AWS DMS endpoint.

Complete the following steps:

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Migrate or replicate.
  3. Choose Endpoints, and then select your endpoint.
  4. Choose Actions, and then choose Modify.
  5. In the Endpoint Configuration section, review the following for Access to endpoint database:
    If you selected provide the access information manually, then check that the host that you defined in the server name field doesn't include ports (3306) or protocols (HTTP). Make sure that you specified the same username, password, and SSL values in your database.
    If you selected AWS Secrets Manager and selected the correct secret manager and SSL mode, then see Common AWS DMS prerequisites and Set up an Amazon VPC endpoint with AWS Secrets Manager.
    If you selected Kerberos Authentication and used the correct server name, port, and username, then see Prerequisites and Limitations on using Kerberos authentication with AWS DMS.
    If you selected IAM Authentication and used the correct server name, port, username, and AWS Identity and Access Management (IAM) role, then check that you attached the correct policies to the IAM role. For more information, choose the DMS Console tab in Configuring IAM authentication for Amazon RDS endpoint in AWS DMS and Limitations for IAM database authentication.

Review endpoint settings and ECAs

If you use Oracle Pluggable database (PDB) as a source when you run your task, then you might get the following error message:

"Test Endpoint failed: Application-Status: 1020912, Application-Message: Log Miner is not supported in Oracle PDB environment Endpoint initialization failed."

This error occurs because you configured the replication method as Log Miner instead of Binary Reader.

To change the replication method that the AWS DMS task uses, complete the followings steps:

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Migrate or replicate.
  3. Choose Tasks, and then select your task.
  4. In the Summary section, select the statement source link.
  5. Choose Actions, and then choose Modify.
  6. In Endpoint Settings, choose Use endpoint connection attributes.
  7. To configure the replication method as Binary Reader, enter the useLogMinerReader=N;useBfile=Y; attribute into the Extra connection attributes (ECAs) field.
  8. Choose Save.

Review query timeout errors

When you initiate your AWS DMS task, you might get the following PostgreSQL query timeout error message:

"]E: RetCode: SQL_ERROR SqlState: 57014 NativeError: 1 Message: ERROR: canceling statement due to statement timeout; Error while executing the query [1022502] (ar_odbc_stmt.c:2738)"

To adjust the executeTimeout parameter on the source database for the AWS DMS task requests, complete the following steps:

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Endpoints, and then select your endpoint.
  3. Choose Action, and then Modify.
  4. In the Endpoint Settings section, choose Use endpoint connection attributes.
  5. To configure a custom executeTimeout, enter executeTimeout=3600; in the Extra connection attributes (ECAs) field.
  6. Choose Save.

If you still experience timeout issues, then see How do I troubleshoot an AWS DMS task that is failing with error message "ERROR: canceling statement due to statement timeout"?

Related information

Working with AWS DMS endpoints

Creating source and target endpoints

Advanced endpoint configuration