Web Layouts Timeouts Using Load Balancer Application

I am getting gateway timeouts when trying to use a port specifically for web maps using an Application Load Balancer in Elastic Beanstalk.

The web app and websocket server is stored in a Docker container, the app works fine but wss: //domain.com: 8080 will just shut down.

Here are load balancing listeners using SSL certificate for wss. Application Load Balancing Listeners

The target group it points to is taking the "protocol" HTTP (I tried HTTPS) and forwarding up to 8080 to the EC2 instance. Or .. It should be. (Seems not to be an option for TCP for an application load balancer).

I have looked through the application load balancing logs and it looks like it reaches the target group, but the time between it is due to the EC2 instance and I don't understand why.

All AWS security groups were open in all traffic at the moment, I checked the host and found that the port is open and listening on Nginx, which will redirect to the correct port in the docker container: EC2 Host port open port

docker ps

also shows me: docker ps

And as soon as inside the container I can see the port is listening by the Websocket server: enter image description here

So it can't be an EC2 instance, can it? Is there a problem in routing websites through ports in ALB?

- Change -

Current SG ALB:

ALB

EC2 SG Instance: EC2

+3


source to share


1 answer


Websockets requires two-way communication, make sure the security groups attached to all resources (EC2 and ALB) provide both inbound and outbound communications on the required ports.



+2


source







All Articles