# Troubleshooting load balancers

Symptoms you can hit with a load balancer, their causes and how to fix them.

## The address shows nothing

**Cause:** The load balancer is still `provisioning`. If its status is `error`, creation failed:
the reason is shown on its page under **Provisioning failed.**, for example a type sold out at the
provider.

**Fix:** Wait for `active`. After an error, delete it and create it again, with another type if
the type was sold out.

## Nothing is forwarded

**Cause:** The load balancer has no service, or no target. On `application`, its page also warns
when no target is in the `default` group.

**Fix:** Add a service and at least one target.

## A target is `unhealthy` but the instance is up

**Cause:** The health check runs against the service's destination port (or a `dedicated`
service's `healthCheckPort`) and, for `http` checks, needs a 2xx or 3xx on the path.

**Fix:** Check that something listens on that port, that the path answers 2xx or 3xx, and that
the instance's firewall lets the load balancer reach it. See [Health checks](health-checks.md).

## A target on `lb11`–`lb31` shows `healthy` but gets no traffic

**Cause:** On the network types the target's `status` is not the health check's result.

**Fix:** Check the instance and the service's health check yourself.

## `503` from an application load balancer

**Cause:** The request matched a rule whose target group has no target, or no healthy target
remains, or the load balancer's connection limit is reached.

**Fix:** Add targets to the group, fix the targets' health, or remove the rule. The **Live** tab
counts refused connections.

## `421 Misdirected Request` from an application load balancer

**Cause:** The request is for a name this load balancer does not serve, or for another load
balancer's name on a connection opened for yours.

**Fix:** A service cannot be changed: remove the https service and add it again with the name
among its domains; see [Point a domain at a load balancer](point-a-domain.md).

## `429` from an application load balancer

**Cause:** The load balancer is over its request rate (20,000 a second, 30,000 in the first
second).

**Fix:** Spread the load over several load balancers. The **Live** tab counts throttled requests.

## Adding an https service says a name is not in your hosted zones

**Cause:** Deutsche Cloud proves the name over DNS through its own nameservers, so the zone must be
hosted under DNS.

**Fix:** Add the zone, or upload your own certificate; see
[Use your own certificate](upload-a-certificate.md).

## The certificate stays **Failed**

**Cause:** The reason is in the service's panel and in `certificateError`. A common one is a zone
that is hosted but not delegated to the Deutsche Cloud nameservers.

**Fix:** Fix it, then choose **Try again**; see [Serve HTTPS](serve-https.md).

## `https://` works, `http://` is refused

**Cause:** The https service was added without the redirect, and no `http` service listens on
port 80. On an `application` load balancer the request is answered `421 Misdirected Request`; on
the other types the connection is refused.

**Fix:** Remove it and add it again with the redirect, or add an `http` service on port 80.

## The redirect cannot be turned on

**Cause:** Another service listens on port 80.

**Fix:** Remove that service first; the redirect takes port 80.

## A change is refused with `409`

**Cause:** Another service owns the load balancer: a database, cache, broker or MySQL cluster
endpoint, or a Kubernetes Service. Its page says so.

**Fix:** Change it through its owner.

## The name stopped reaching the load balancer

**Cause:** The load balancer was deleted, and its addresses with it.

**Fix:** Point the records at the new load balancer's addresses.
