I have a system running on aws beanstalk , it's a Java application with Tomcat + Spring architecture. I'm having trouble making the websocket work, which is locally functional. The websocket receiver answers to url dominio/socket
, and the client connection is done in javascript as follows:
new WebSocket("wss://dominio/socket");
In aws the application runs on elastic beanstalk, with an application load balancer . I tried in several ways to make it work, however I have the following return:
Some information about the current environment:
- Ports 80, 8080, and 443 are open in the load balancer;
- I created target groups, enabled Stickiness, and associated the load balancer in path
/socket
in the http and https protocols - https is configured with aws-generated certificate;
- The load balancer manages 2 instances.
I'm running out of alternatives, I've done a lot of research and tried to reproduce some ideas, but with no success so far. I do not know if having a two-instance load balancer invalidates the current architecture.
I ask for some suggestion for the issue and / or sharing of websocket usage in aws with similar art.
Thank you.