PROXY protocol HTTP Origin: Network OSI layer 7 · Application Last updated 18 Nov 2026

PROXY protocol error: broken header / unexpected data from the load balancer

A server expecting the PROXY protocol header received plain HTTP (or vice versa), so the connection is rejected.

Exact message you may see broken header while reading PROXY protocolclient sent invalid PROXY protocol headerupstream sent invalid PROXY protocol headerPROXY protocol errorrecv() failed (104: Connection reset by peer) while reading PROXY protocol
Seen on: HTTP Nginx AWS

Meaning

When proxy_protocol is enabled on nginx/HAProxy/ELB, every connection must start with the PROXY line. Enable it on both sides or neither; health checks and direct connections without the header fail with "broken header".

Common causes

  • PROXY protocol enabled on one side only
  • Health checks without the PROXY header
  • Direct access bypassing the load balancer
  • Wrong version (v1 vs v2)
  • TLS passthrough ordering

⚡ Quick fix

  1. Match the setting on the load balancer and server
  2. Separate listeners for health checks/direct access
  3. Use the same PROXY protocol version

Detailed fix by platform

Nginx

  1. nginx
    listen 443 ssl proxy_protocol;
    set_real_ip_from 10.0.0.0/8;
    real_ip_header proxy_protocol;

How to diagnose

  1. LB — Sends PROXY header?
  2. Server — Expects it?
  3. Version — Matches?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

102 — HTTP 102 Processing (HTTP)102201 — HTTP 201 Created (HTTP)201400 — HTTP 400 Bad Request (HTTP)400405 — 405 Not Allowed when POSTing to a static page or file (nginx) (HTTP)405502 — Intermittent 502 caused by keep-alive timeout mismatch (HTTP)502HAProxy — HAProxy: unable to load SSL private key from PEM file / no certificate found (crt bundle format) (SSL / TLS)HAProxyHAProxy backend — HAProxy: SSL handshake failure on the backend (verify required, no CA file, SNI missing) (SSL / TLS)HAProxy backendplugin — Certbot: The requested nginx plugin does not appear to be installed (or "No installers found") (SSL / TLS)pluginPROXY pro…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.