Help Center> Elastic Load Balance> User Guide> FAQs> ELB Usage> Service Abnormality> Why a Backend Server Can't Be Accessed Through a Load Balancer?

Why a Backend Server Can't Be Accessed Through a Load Balancer?

Symptom

This FAQ provides guidance for you to troubleshoot the following problems:

  • Backend servers cannot be accessed using a load balancer.
  • You can use a private IP address to access the load balancer, but cannot use a public IP address to access it.
  • Backend servers are considered unhealthy.

Background

Figure 1 shows how a client accesses backend servers through a load balancer.

  1. The public network load balancer uses an EIP to receive traffic over the Internet, while the private network load balancer receives traffic within the VPC.
  2. The load balancer receives incoming traffic using the frontend protocol and port configured for the listener.
  3. The listener checks the health of backend servers. Only healthy backend servers can receive traffic from the listener.
  4. The listener forwards the traffic to backend servers based on their weights and the listening rules.

Generally, the problem is probably caused by the security control (the yellow part in the figure) or health check configuration (the green part).

It is recommended that you locate the fault from backend servers, the load balancer, to the clients.

Figure 1 How clients access backend servers through a load balancer

Step 1: Check Whether the Backend Server Can Be Directly Accessed

Use a client to directly access the IP address of the backend server to determine whether the fault is caused by the load balancer or backend server. To do so, ensure that the firewall and network ACL rules allow network communication between the client and backend server are enabled.

  • Clients on the public network: Bind an EIP to the backend server. Release the EIP after the verification is complete.
  • Clients on the private network: No EIP is required. If the client is in another VPC, set up a VPC peering connection.

If the fault persists, go to Step 2: Check Whether the Health Check Function Is Enabled.

Step 2: Check Whether the Health Check Function Is Enabled

If the client can directly access the backend server, check whether the health check function is enabled. If the health check function is enabled but the backend server is detected unhealthy, the load balancer will not route traffic to it.

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Click Service List. Under Network, click Elastic Load Balance.
  4. Click the name of the load balancer.
  5. On the Backend Server Groups tab page, check whether the health check function is enabled.

Step 3: Check Whether the Backend Server Is Healthy

If the health check function is enabled but the backend server is detected unhealthy, the load balancer will not route traffic to it. Locate the listener, click the Backend Server Groups tab on the right, and view the health check result of the backend server.

If the fault persists, go to Step 4: Check Whether the Backend Server Configuration Is Correct.

Step 4: Check Whether the Backend Server Configuration Is Correct

  1. Locate the listener, click the Backend Server Groups tab on the right, and view the backend server parameters. Note the following parameters:
    • Weight: If the weight is set to 0, traffic will not be forwarded to the server.
    • Backend port: It must be the same as the port used by the backend server.
  2. On the Listeners tab page, locate the TCP or UDP listener, click , and check whether the Obtain Client IP Address option is enabled.

    If this option is enabled, the load balancer uses the IP address of the client to access the backend server. In this case, configure the security group and network ACL rules to allow access from this IP address.

To ensure that all clients can access the backend servers, you are advised to configure security group rules of backend servers to allow all traffic and configure network ACLs and access control to ensure security.

If the fault persists, go to Step 5: Check Whether Access Control Is Enabled.

Step 5: Check Whether Access Control Is Enabled

On the Basic Information tab page of the listener, check whether access control is enabled and the client is allowed to access the listener.

Submit a Service Ticket

If the problem persists, submit a service ticket.