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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠