AWS ALB returns 464 for wss:// requests.

0

I have an alb listening on http:80 and https:443. http redirects to https. (user) -https-> ALB -http-> target_group:4000-> target:4000. I am able to connect via https to my targets. When I try to connect via wss: I get a 464 error. I can connect via

curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: my_app.com" -H "Origin: https://my_app.com/live/websocket" https://my_app.com/live/websocket

and I see the connection on my target. What am I missing?

TLS version and cipher headers: Off HTTP client keepalive duration: 3600 seconds WAF fail open: Off (No WAF enabled) HTTP/2: On Connection idle timeout: 60 seconds Desync mitigation mode: Defensive Drop invalid header fields: Off X-Forwarded-For header: Append Client port preservation: On Preserve host header: Off

asked 10 months ago1K views
2 Answers
1
Accepted Answer

It's mentioned here: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-464-issues that the ALB isn't able to take a text-based HTTP/1.1 request and send it to a target group that uses the binary HTTP/2 protocol. If your clients aren't able to use HTTP/2 for some reason, it's probably best to set the target group to use HTTP/1.1 to match the requests.

All the protocol version combinations for ALBs are listed here: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-protocol-version

EXPERT
answered 10 months ago
profile picture
EXPERT
reviewed 10 months ago
  • This saved me. I am still trying to understand why my app is making this request via http/1. All other requests are http/2. Either way, Thank you!

0

You're showing that the load balancer is enabled for HTTP/2. What's the corresponding protocol version selected for the target group?

EXPERT
answered 10 months ago
  • Also HTTP/2

  • Is the request made with HTTP/1.1 or HTTP/2? You can see it in the developer tools in any Chromium-based browser, on the Network tab.

  • It's showing http/1.1 in both the browser and the ALB logs.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions