I’m currently running an application on an EC2 instance, which is operating through a Docker image. The Docker run command I’m using is docker run 80:8443 because I have EXPOSE 8443 in my Dockerfile. My application is set up with SSL, so when I enter the domain of the EC2 instance, I get HTTPS, which I’ve set up through an Application Load Balancer (ALB).
In the ALB, I have two rules that redirect HTTPS 443 to a target group and HTTP 80, which redirects to HTTPS. However, I’m having trouble setting up a WebSocket Secure (WSS) connection. On my webpage, when JavaScript is creating the WebSocket, I get an error after about 10 seconds: home.js:41 WebSocket connection to ‘wss://hlnetworkloadbalancer-43657e5275383913.elb.eu-central-1.amazonaws.com/harmony-websocket-handler’ failed:.
I’m not sure what I need to do to get the WSS connection working. Any help would be appreciated.
Maksymilian Fischer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.