This topic describes how to test the connectivity of an ApsaraDB for HBase cluster and provides the possible reasons for connection failures.

Background information

To ensure security, ApsaraDB for HBase does not support Internet Control Message Protocol (ICMP) for ping operations. Therefore, you cannot ping an ApsaraDB for HBase cluster. You can use Telnet to test whether a cluster is connected. ApsaraDB for HBase allows you to connect to your cluster over an internal network or the Internet. To connect to your cluster over the Internet, you must first apply for a public endpoint for the cluster.

Procedure

  1. Configure the ZooKeeper address of the cluster.
    Note ApsaraDB for HBase provides three ZooKeeper addresses for a cluster. You need only to select one of them.
  2. Set the port to 2181. If you use Telnet to connect to an ApsaraDB for HBase cluster, the port is 2181.
    Note If you use Thrift or other database services to connect to an ApsaraDB for HBase cluster, use the corresponding domain name and port.
    In the following example, the cluster is connected:
    [xx@yy-MacBook-Pro ~]$ telnet  hb-xxxxx-001.hbase.rds.aliyuncs.com 2181
    Trying 10.10.10.10...
    Connected to hb-xxxxx-001.hbase.rds.aliyuncs.com .
    Escape character is '^]'.
    In the following example, the cluster cannot be connected:
    [xx@yy-MacBook-Pro ~]$ telnet  hb-xxxxx-001.hbase.rds.aliyuncs.com 2181
    Trying 10.10.10.10...
    telnet: connect to address 10.10.10.10: Operation timed out
    telnet: Unable to connect to remote host

Reasons for connection failures

  • You have not configured a whitelist to allow access to your ApsaraDB for HBase cluster in the ApsaraDB for HBase console. You must configure a whitelist for the cluster regardless of whether you connect to the cluster over the Internet or an internal network. For more information about how to configure a whitelist, see Configure a whitelist.
  • ApsaraDB for HBase is not allowed to access your local network. For example, if you use an Elastic Compute Service (ECS) instance to test the connectivity of the cluster, you must allow ApsaraDB for HBase to access the ECS instance.
  • If the local network is of the Classic Network type, you cannot access an ApsaraDB for HBase cluster over a virtual private cloud (VPC).
  • If your ApsaraDB for HBase cluster and client are deployed in the same VPC but are connected to different vSwitches, you must configure routing rules.
  • By default, two different VPCs are not connected. You can use Express Connect to enable communication across VPCs.
  • You are connecting to an ApsaraDB for HBase cluster from a network outside Alibaba Cloud, such as the private network of your company.
    1. Apply for a public endpoint for the ApsaraDB for HBase cluster.
    2. Use a leased line to connect to an Alibaba Cloud data center.
  • If you use an ECS instance to connect to an ApsaraDB for HBase cluster over the Internet, you must allow Internet access to the ECS instance. If the ECS instance does not allow Internet access, the ECS instance cannot be connected to the ApsaraDB for HBase cluster.

If the connection failure is not caused by a reason described in this section, contact the ApsaraDB for HBase expert team on DingTalk.