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

posta 3 anni fa654 visualizzazioni
1 Risposta
0

This is a duplicate question.

con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande