This topic describes how to troubleshoot a health check exception of a layer-4 (TCP/UDP) listener. The health check function is used to determine whether your backend servers are healthy. When a health check exception occurs, it generally means that your backend server is unhealthy. The exception may also be caused by incorrect health check configurations.

Procedure

  1. Make sure that the backend server does not block the CIDR block 100.64.0.0/10 through iptables or other third-party firewalls or security software.

    Server Load Balancer (SLB) communicates with backend servers by using IP addresses in the reserved CIDR block 100.64.0.0/10. If the CIDR block is blocked, health check exceptions occur and SLB cannot work normally.

  2. Run the telnet command to test the backend server.
    1. Log on to the SLB console and check the health check configurations.

      By default, the port of the backend server is used as the Health Check Port. You can also set the port manually. In this example, the port of the backend server, namely port 80, is used.

    2. Run the following command to connect the health check port. The health check port configured on the SLB instance must be the same as the listening port on the backend server.

      telnet 172.17.58.131 80

      In this example, 172.17.58.131 is the internal IP address of the backend server, and 80 is the health check port. By default, the port of the backend server is used as the health check port. You can configure the health check port according to your actual situation.

      • In normal conditions, Connected to xxx.xxx.xxx.xxx is returned. This indicates that the port on the backend server is working (listening) normally and the health check succeeds, as shown in the following figure.
      • Exception example: Assume you do not change the listener configurations of the SLB instance but stop the listening process of port 80 on the backend server. Then, if you run the telnet command, the system prompts that the host cannot be connected. This means that a health check exception occurs if the listening process of port 80 stops, as shown in the following figure.
  3. Optional: Layer-4 listeners support HTTP health checks. If you use HTTP health checks, see Troubleshoot a health check exception of a Layer-7 listener (HTTP/HTTPS) for troubleshooting.