All Products
Search
Document Center

ApsaraDB for OceanBase:Add a data source

Last Updated:Jan 03, 2023

  • Error

    The following error is reported when you add an RDS for MySQL data source on the Data Source Management page:

    Cause of failure: [DB_QUERY_ERROR]{"jdbcUrl":"jdbc:mysq://10.10.10.1:5119?allowLoadLocallnfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false&useSSL=false","message":"com.oceanbase.oms.cm.client.exception.CmServerException:failures occured while executing command,skip remaining command;errorcode:BAD_GATEWAY"}.

    Solution

    When this error occurs, perform the following troubleshooting steps:

    • Make sure that the whitelists in the RDS for MySQL instance are correctly configured.

      OceanBase Migration Service (OMS) automatically creates a whitelist, named in the ob_oms_cn_xxxxx format, in the RDS for MySQL instance. The whitelist contains the CIDR block of OMS.

      The task of creating the whitelist is affected by other tasks processed in the RDS for MySQL instance and may fail due to multiple factors. In that case, you can add the CIDR block displayed on the Add Data Source page of OMS to any existing whitelist in the RDS for MySQL instance.

    • Make sure that you enter the correct username and password when you add the data source.

      The following error message indicates that the password is incorrect: Access denied for user 'use_name'@'x.x.x.x' (using password: YES).

  • Error

    The following error is reported when you add an RDS for MySQL data source in a data migration project:

    Cause of failure: [DB_QUERY_ERROR]{"jdbcUrl":"jdbc:mysq://10.10.10.1:4100?allowLoadLocallnfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false&useSSL=false","message":"com.oceanbase.oms.cm.client.exception.CmServerException:java.net.UnknownHostException:i3lhk5fxzu1cw;errorcode:BAD_GATEWAY"}.

    Background:

    • Whitelists are correctly configured.

    • You can remotely connect to the RDS instance but cannot use it or access it over the public network.

    Possible causes

    The UnknownHostException error indicates that the OMS instance resource has not been allocated. If you purchase an OMS instance for the first time, it takes 10 to 15 minutes to create the instance resource.

    Solution

    Configure the data migration project after the instance resource is created.