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.
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 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
- Match the setting on the load balancer and server
- Separate listeners for health checks/direct access
- Use the same PROXY protocol version
Detailed fix by platform
Nginx
- nginx
listen 443 ssl proxy_protocol; set_real_ip_from 10.0.0.0/8; real_ip_header proxy_protocol;
How to diagnose
- LB — Sends PROXY header?
- Server — Expects it?
- 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:
Similar errors
Most viewed in HTTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 18 Nov 2026