All Products
Search
Document Center

:Troubleshooting for test connection failures when configuring a migration task

Last Updated:Sep 22, 2023

Overview

When configuring a data migration task, you can test the database connection. This topic describes the causes of failures and provides corresponding solutions based on different instance types.

Description

The following table describes the possible reasons for a connectivity precheck failure.

image.png

Check item

Possible reason

Troubleshooting

JDBC

  1. The username or password of the database account is incorrect, or the IP address or port number of the destination database is incorrect.

  2. The database account cannot be used to access the destination database over an endpoint.

  1. Check and correct the connection information about the destination database.

  2. Allow access to the destination database over all endpoints.

Ping

  1. The network of the service to which the database instance belongs is unavailable.

  2. The IP address of the destination database is incorrect.

  1. Check whether the network is available.

  2. Check and correct the IP address of the destination database.

Telnet

  1. The DTS servers are not allowed to access the destination database.

  2. The port number of the destination database is incorrect.

  1. Allow access to the destination database from the public CIDR blocks of the DTS servers. For example, disable the firewall of the service to which the destination database belongs or add the public CIDR blocks of the DTS servers to the whitelist of the destination database.

  2. Check and correct the port number of the destination database.

When a DTS test connection failure occurs, you need to first connect to the database from the database client, verify the database activity and database connection information. If the database is alive and the connection information is correct, you can use the following method to diagnose the problem.

User-created database with a public IP address

Perform required operations based on the following test results:

Test result 1

Symptom

When you test the connection, use the ping command to test whether the network is disconnected, use the telnet command to test whether the port is disconnected, and whether the JDBC connection is disconnected.

Causes

The database may have access source restrictions, for example, iptables restrictions on the database.

Troubleshooting

Log on to the server where the database is stored and run the iptables- L command to check whether iptables is set. If you have set iptables, select the DTS IP address segment, open the access restriction of DTS in iptables.

Test result 2

Symptom

When testing the connection, use the ping command to test the network status. Use the telnet command to test whether the port is disconnected and whether the JDBC connection is disconnected.

Causes

SOURCE restrictions may have been imposed on the database port, such as iptables or ACL restrictions on the database port.

Troubleshooting

Based on the region where the destination instance of the migration task is located. DTS IP address segment, in iptables or ACL, remove the restrictions for DTS to access the database.

Test result 3

Symptom

When testing the connection, use the ping command to test that the network is normal, and use the telnet command to test that the port is normal, but the JDBC is disconnected.

Causes

  • The possible cause is that the password for the database account or the IP address and Port number of the database are invalid.

  • The possible reason is that the database account authorization restricts the connection address.

Troubleshooting

  • Check and modify the database connection information.

  • Please open all connection addresses.

User-created database hosted on ECS

Perform required operations based on the following test results:

Test result 1

Symptom

When you test the connection, use the ping command to test whether the network is disconnected, use the telnet command to test whether the port is disconnected, and whether the JDBC connection is disconnected.

Causes

iptables may be configured on the ECS instance, which restricts the source of access to the database. Log on to the ECS instance and run the following command to check whether iptables is configured: If the limit entries of iptables are returned, select the DTS IP address segment, release the DTS access restriction in iptables.

iptables -L

Test result 2

Symptom

When testing the connection, use the ping command to test the network status. Use the telnet command to test whether the port is disconnected and whether the JDBC connection is disconnected.

Causes

This problem may occur when ECS instances are associated with security groups.

Troubleshooting

Based on the region where the destination instance of the migration task is located. DTS IP address segment. Log on to the ECS console and check whether the security group blocks the CIDR block of DTS.

Test result 3

Symptom

When testing the connection, use the ping command to test that the network is normal, and use the telnet command to test that the port is normal, but the JDBC is disconnected.

Causes

  • The possible cause is that the password for the database account or the IP address and Port number of the database are invalid.

  • The possible reason is that the database account authorization restricts the connection address.

Troubleshooting

  • Check and modify the database connection information.

  • Please open all connection addresses.

Local database connected through a leased line

For physical access, you need to configure static routes on the access device of the on-premises data center and the route table on the VBR. For more information, see leased Line Access User Manual to check whether the route configurations are correct.

Cloud instance

The password of the database account may be incorrect.