Troubleshoot OceanBase connection issues

更新时间:
复制 MD 格式

This page describes common database connection issues.

Symptoms

A connection to the database cannot be established.

Causes

The following issues can prevent a database connection:

  1. The public endpoint and private endpoint are configured incorrectly.

  2. The IP address or CIDR block of the client is not added to the whitelist.

  3. The username or password is incorrect.

  4. The tenant connection mode is incorrect.

  5. The network type of the ECS client instance is not a virtual private cloud (VPC).

  6. The ECS client and the OceanBase instance are in different regions.

    The VPC of the ECS client is different from the VPC of the OceanBase tenant.

Solutions

Check the public and private endpoints

  1. Log on to the OceanBase Management Console.

  2. On the Cluster List page, select the desired cluster and click its name to open the Cluster Workspace.

  3. In the navigation pane on the left, click Tenant Management to open the Tenant List page. Click the tenant name to open the Tenant Workspace.

  4. In the Deployment Diagram section, view the private and public endpoints.

    Note

    A private endpoint is requested by default when a tenant is created. For a public network connection, you must click Request Public Endpoint.

Check the whitelist settings

  1. Log on to the OceanBase Management Console.

  2. On the Cluster List page, select the desired cluster and click its name to open the Cluster Workspace.

  3. In the navigation pane on the left, click Security Settings.

  4. In the Whitelist Group section of the Security Settings page, verify that the IP address or CIDR block of the client is in the whitelist.

    Note

    • The OceanBase whitelist applies at the cluster level. Therefore, it cannot distinguish between tenants or network connection types, such as internal or public.

    • The whitelist addresses for accessing OceanBase over a public or internal network are set as follows:

      • Internal network access: The address range in the whitelist must be the internal IP address of the ECS instance.

      • Public network access: Verify that the public IP address added to the whitelist is the actual egress IP address of the device. For example, if the IP address is 127.0.0.1, no device can access the tenant.

        For more information, see Whitelist groups.

Check the username and password

  1. Log on to the OceanBase console.

  2. In the navigation pane on the left, click Cluster List.

  3. In the cluster list, select the destination cluster and click its name to go to the Cluster Workspace.

  4. In the tenant list, click the name of the destination tenant to go to the Tenant Details page.

  5. In the navigation pane on the left, click Account Management.

  6. In the Account Management list, find the account, click Modify Password in the Operations column, reset the password, and retry the connection.

    Note

    Avoid entering the username and password with leading or trailing spaces. Also, avoid pasting hidden characters along with the credentials.

Check the tenant connection mode

  1. Log on to the OceanBase console.

  2. In the navigation pane on the left, click Cluster List.

  3. In the cluster list, click the name of the destination cluster to open the Cluster Workspace.

  4. In the tenant list, click the name of the destination tenant to open the Oracle or MySQL Tenant Workspace.

  5. On the tenant workspace page, click the Log on to Database button in the upper-right corner to log on to ODC.

  6. On the ODC homepage, on the Personal Connections tab, click New Connection.

  7. Select the region where the tenant resides (public cloud) and confirm that the connection mode (MySQL or Oracle) is correct.

    MySQL tenant

    Oracle tenant

    Note

    OBClient connection format:

    obclient -h[tenant_domain_name] -u[tenant_username] -P3306 -p[tenant_password]

    Note

    OBClient connection format:

    obclient -h[tenant_domain_name] -u[tenant_username] -P1521 -p[tenant_password]

Check the network type of the ECS client instance

Verify that the network type of the ECS client instance is VPC.

Check the regions of the ECS client and the OceanBase instance

Ensure that the ECS client and the OceanBase instance are in the same region.

Check the VPCs of the ECS client and the OceanBase tenant

For an internal network connection, the VPC of the client must be the same as the VPC of the tenant in the OceanBase cluster.

Note

This scenario applies if you do not use special methods to connect networks across different VPCs. For standard internal network access, the client and tenant must be in the same VPC.

  1. View the VPC of the OceanBase tenant.

    1. Log on to the OceanBase console.

    2. In the navigation pane on the left, click Cluster List.

    3. In the cluster list, select the destination cluster and click its name to go to the Cluster Workspace.

    4. In the tenant list, click the name of the destination tenant to go to the Oracle or MySQL Tenant Details page.

    5. In the Basic Information section, view the User VPC of the OceanBase instance.

  2. View the VPC of the ECS client.

    1. Log on to the Elastic Compute Service (ECS) console.

    2. In the navigation pane on the left, click Instances & Images符号Instances.

    3. In the Network Information section of the Instance Details page, view the VPC in the VPC field.

  3. Confirm that the User VPC and the Virtual Private Cloud for OceanBase are the same.