Websockets on ALB not connecting (404 not found)

0

Edit: I accidentally submitted this twice. I'm marking this one as solved because I guess I can't delete posts.

I'm building a Django application on an ec2 that sits behind an application load balancer directing https traffic.
The ALB listens for https traffic and forwards it to the target group (http1, port 80) that contains the ec2 instance.

The Django app is running asgi through Daphne. Pretty simple configuration; host 0.0.0.0, port 80.
Https traffic works fine. No problems there. However I can't seem to get a simple websocket handshake.

in Firefox I get this error: GET wss://my_dns.com/ws/chat/lobby/ (HTTP/1.1 404 Not Found)
Firefox can’t establish a connection to the server at wss://my_dns.com/ws/chat/lobby

The security group for the ALB is allowing all inbound traffic on all ports.
I did have the target group originally set up without stickiness. I tried load balancing stickiness (1 day, 300 second deregistration delay, 0 slow start duration) and that didn't seem to work either.

All traffic, https and websockets is going through Daphne. I don't have any nginx reverse proxies or anything apache. It's just ALB and the ec2 instance and Daphne. I'm really hoping I have something incorrectly configured. haha.

Anyone have any thoughts where to begin troubleshooting this?

Thanks!

Edited by: BirdThunderford on Apr 14, 2021 7:54 PM

Edited by: BirdThunderford on Apr 14, 2021 7:58 PM

質問済み 3年前654ビュー
1回答
0

This is a duplicate question.

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ