Common error codes
The Cloudflare Load Balancing API adds global health to each pool and endpoint. It also gives you a view into what our network sees at a wider level. Cloudflare uses a quorum system to determine pool and endpoint health status. The quorum is taken from PoPs responsible for running health monitor requests in a region, and the majority result is used.
When troubleshooting failures, use the Cloudflare API for programmatic access to Cloudflare Load Balancing. The Health Monitor Events and Load Balancer Monitors routes are excellent tools for accessing load balancing event logs and reconfiguring Cloudflare monitors.
You can get a per-data center breakdown of the health of your endpoints from the Cloudflare API from the List Health Monitor Events command:
GET user/load_balancing_analytics/events
If a health monitor request fails, the breakdown will include the reason.
Common troubleshooting causes and solutions are listed below.
TCP connection failed
Section titled “TCP connection failed”Our health monitor requests failed to establish a TCP connection to your endpoint.
Solution
Section titled “Solution”This typically occurs when there is a network failure between Cloudflare and your endpoint, and/or a firewall refused to allow our connection. Ensure your network and firewall configurations are not interfering with load balancing traffic.
HTTP timeout occurred
Section titled “HTTP timeout occurred”The endpoint failed to return an HTTP response within the timeout configured. This happens if you have the timeout set to a low number — 1 or 2 seconds, for instance.
Solution
Section titled “Solution”We recommend increasing the HTTP response timeout to allow the endpoint to respond.
Response code mismatch error
Section titled “Response code mismatch error”Cloudflare receives an HTTP status code that does not match the values defined in the expected_codes
property of your Cloudflare monitor configuration.
Solution
Section titled “Solution”Response codes must match the expected_codes
. Use the List Monitors API command to confirm the values are correct.
Alternate cause
Section titled “Alternate cause”You may also see this issue if you have a monitor configured to use HTTP connections and your endpoint is redirecting to HTTPS. In this case, the response code will often be 301, 302, or 303.
Solution
Section titled “Solution”Either change your Cloudflare monitor configuration to use HTTPS, or set the value of follow_redirect
to true
so that we can resolve the correct status code.
Response body mismatch error
Section titled “Response body mismatch error”The response body returns from your endpoint and does not include the (case-insensitive) value of expected_body
configured in your monitor.
Note that we only read the first 10 KB of the response. If you return a larger response, and the expected_body is not in the first 10 KB, the health monitor request will fail.
Solution
Section titled “Solution”Ensure the expected_body is in the first 10 KB of the response body.
TLS untrusted certificate error
Section titled “TLS untrusted certificate error”The certificate is not trusted by a public Certificate Authority (CA).
Solution
Section titled “Solution”If you're using a self-signed certificate, we recommend either using a publicly trusted certificate or setting the allow_insecure
property on your monitor to true
.
TLS name mismatch error
Section titled “TLS name mismatch error”Our health monitor (client) was not able to match a name on the server certificate to the hostname of the request.
Solution
Section titled “Solution”Use the List Monitors command to confirm that the header
value set in the Cloudflare monitor is correct and the Update Monitors command to make any necessary changes.
TLS protocol error
Section titled “TLS protocol error”This error can occur if you’re using an older version of TLS or your endpoint is not configured for HTTPS.
Solution
Section titled “Solution”Ensure that your endpoint supports TLS 1.0 or greater and is configured for HTTPS.
TLS unrecognized name error
Section titled “TLS unrecognized name error”The server did not recognize the name provided by the client. When a host header is set, we set this as the ServerName in the initial TLS handshake. If not set, we will not provide a ServerName, which can cause this error.
Solution
Section titled “Solution”Set the host header in your monitor object.
No route to host error
Section titled “No route to host error”The IP address cannot be reached from our network. Common causes are ISP or hosting provider network issues (e.g. BGP level), or that the IP does not exist.
Solution
Section titled “Solution”Make sure IP is accurate, and if it is check if there is an ISP or hosting provider network issue.
Exceeded quota error
Section titled “Exceeded quota error”You will receive this error if you attempt to create more objects (monitors, pools, or endpoints) than are included in your plan.
If using the dashboard, you will not be able to create additional objects.
If you're using the Cloudflare API, you will receive an error message.
Solution
Section titled “Solution”- Enterprise customers who need to create more objects (load balancers, pools, endpoints, or monitors) should reach out to their account team to discuss this issue.
- Self-service customers can upgrade their Load Balancing subscription with more endpoints to increase load balancing capacity.
TCP Timeout
Section titled “TCP Timeout”Data transmission was not acknowledged and retransmit of data did not succeed.
Solution
Section titled “Solution”Confirm whether the SYN-ACK for the handshake takes place at your endpoint and contact Cloudflare Support.
TLS Handshake Failure
Section titled “TLS Handshake Failure”Indicates that the browser's connection to the web server is not secure.
Solution
Section titled “Solution”Change wifi networks, connect to a wired network, or verify the network connection is stable.
Network Unreachable
Section titled “Network Unreachable”Cloudflare cannot connect to the endpoint due to network unavailability. This is usually caused by a network issue or incorrect IP.
Solution
Section titled “Solution”Check either the IP entered for the endpoint in Cloudflare's Load Balancer configuration or the IP returned via DNS for the endpoint hostname.
HTTP Invalid Response
Section titled “HTTP Invalid Response”Usually caused by an HTTP 502 error or bad gateway.
Solution
Section titled “Solution”Ensure the endpoint responds to requests and that no applications have crashed or are under high load.
DNS Unknown Host
Section titled “DNS Unknown Host”The endpoint hostname does not exist.
Solution
Section titled “Solution”Confirm the endpoint resolves to an IP address.
Connection Reset by Peer
Section titled “Connection Reset by Peer”A network error occurred while the client received data from the endpoint.
Solution
Section titled “Solution”Confirm whether the endpoint is experiencing a high amount of traffic or an error.
Monitor Config Error
Section titled “Monitor Config Error”There was a configuration error in the monitor and no checks are run against the pool endpoints.
Solution
Section titled “Solution”Review your monitor configuration to ensure it matches an expected request to your endpoint.
DNS Internal
Section titled “DNS Internal”The endpoint's hostname resolves to an internal or orange-clouded IP address. No checks are run against the pool endpoints.
Solution
Section titled “Solution”Cloudflare does not allow use of an endpoint hostname that is proxied by Cloudflare.
Load Balancing Not Enabled
Section titled “Load Balancing Not Enabled”Load Balancing is not enabled for your account or zone.
Solution
Section titled “Solution”For Enterprise customers, reach out to your Cloudflare Account Team. Free, Pro, and Business customers should Enable Load Balancing.
Validation failed error
Section titled “Validation failed error”You will receive an error if you try to set the host header value while configuring a load balancer endpoint.
Solution
Section titled “Solution”Cloudflare now restricts configured endpoint host headers to fully qualified domain names (FQDNs) that are immediate subdomains of a zone associated with the account. For example, this host header would be the same zone as the load balancer itself, but pools may be used across multiple Load balancers.
Object referenced by other objects
Section titled “Object referenced by other objects”You will receive this error when you attempt to delete a pool that is referenced by a load balancer geo steering region.
Solution
Section titled “Solution”Remove the pool from the load balancer's geo steering configuration. If your load balancer no longer uses geo steering, you will need to re-enable geo steering and then remove the pool.
Other Failure
Section titled “Other Failure”If the failure cannot be classified as any other type of failure mentioned above.
Solution
Section titled “Solution”Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark