daltoniam / Starscream

Websockets in swift for iOS and OSX
Apache License 2.0
8.33k stars 1.21k forks source link

"Invalid HTTP upgrade", code: 404)) for 3.0.6 version of Starscream #949

Closed rampn443 closed 1 year ago

rampn443 commented 2 years ago

Describe the bug

We have deployed an Application Load Balancer (ALB) for our spingboot application which consists of both Rest and Websocket services hosted in EKS cluster. We added health check, ssl redirect etc. annotations in the ingress.yaml file. The listener is HTTPS: 443 and the SSL certificate is from ACM and TLS termination is happening at the ingress.

When we hit the ALB endpoint, rest service is working fine but receiving the following error with the websocket service.

Websocket Optional(wss://xxx.xx.xx.com:443/xx/xx/xx/xx) disconnected with error Optional(Starscream.WSError(type: Starscream.ErrorType.upgradeError, message: "Invalid HTTP upgrade", code: 404))

The same is working fine with the Network Load balancers in AWS.

app.kubernetes.io/instance: aws-load-balancer-controller app.kubernetes.io/name: aws-load-balancer-controller app.kubernetes.io/version: v2.3.0 helm.sh/chart: aws-load-balancer-controller-1.3.2 Kubernetes version: 1.19 Platform version: eks.7

Environment:

Any help in resolving this issue is highly appreciated. Thank you!

acmacalister commented 1 year ago

Any steps to reproduce, sample projects, etc would be appreciated.