Help Center/ Data Replication Service/ Troubleshooting/ Solutions to Failed Check Items/ Networks/ Checking Whether the Destination Database Is Connected
Updated on 2024-05-09 GMT+08:00

Checking Whether the Destination Database Is Connected

In the pre-check phase, DRS checks the connectivity and accuracy of the destination database IP address, port, username, and password.

Failure Cause

  • The username or password is incorrect.
  • The port cannot be accessed.
  • The database account does not allow remote connection.
  • Kafka brokers are unavailable.
  • The connection fails.

Handling Suggestion

  • Check whether the username and password entered during the DRS connection test are correct. Enter the correct database username and password and perform the pre-check again.
  • If the port entered during the connection test cannot be accessed, check whether the port exists. If the port is correct, check whether the firewall is enabled.
  • If the destination database is PostgreSQL, and the database configuration file pg_hba.conf does not contain the database account configuration, grant the remote connection permission for the account.

    Add the following to pg_hba.conf, and restart the database for the modification to take effect:

    host all xxx(dbuser) 0.0.0.0/0 method

    After the task is complete, delete this record and restart the database again.

  • If the destination database is Kafka, the possible causes are as follows:
    • Check whether Kafka brokers are normal.
    • Check whether security authentication is enabled on Kafka. If security authentication is enabled, select the corresponding security connection mode. For details, see Kafka Authentication.
  • Before data migration, ensure that the network has been prepared well and security rules have been configured. If the connection fails, perform the following operations to check whether the network configuration is correct:
    • Public network
      1. Ensure that public accessibility is enabled for the database.
      2. Ensure that the security rules of the database are correctly configured.

        You need to add the EIP of the DRS instance to the whitelist of the database to ensure that the DRS instance can access the database. The IP address displayed on the Configure Source and Destination Databases page is the EIP of the DRS instance.

      3. Ensure that the firewall settings are correct.

        The firewall of the data center must allow access from the EIP of the DRS instance so that the DRS instance can access the database.

        Inbound access: Allows access from the EIP of the DRS instance to the database listening port.

        Outbound access: Allows data transmission from the database listening port to the EIP of the DRS instance.

    • VPC
      1. Ensure that the database security group is correctly configured.

        View inbound rules to allow traffic from the private IP address of the DRS instance to the database listening port. The IP address displayed on the Configure Source and Destination Databases page is the private IP address of the DRS instance.

      2. Ensure that the database network ACL is correctly configured.

        By default, a VPC does not have a network ACL. If you have configured a network ACL, add an inbound rule.

    • VPN or Direct Connect
      1. Ensure that the database VPN or Direct Connect is correctly configured.
      2. Ensure that the security rules of the database are correctly configured.

        You need to add the private IP address of the DRS instance to the whitelist of the database to ensure that the DRS instance can access the database. The IP address displayed on the Configure Source and Destination Databases page is the private IP address of the DRS instance.

      For more details about network settings, see Overview of Preparations.