Reputation: 4528
I'm having trouble working with AWS ElasticBeanstalk with NodeJS environment + Socket.IO + SSL for our messaging app.
I'm already running in circles trying to fix the issue but I always ends up to a Websocket handshake error (504 GATEWAY_TIMEOUT).
AWS Elastic Beanstalk Load Balancer configuration:
ELB security inbound rule
Instance's security inbound rule
Response error
Front end code
Thanks in advance. Any help is highly appreciated!
Upvotes: 4
Views: 2398
Reputation: 4528
Finally!!! Got it!
So after a lot of hours burned, this solution works for me.
The problem is that I have HTTPS in my load balancer pointed to HTTP on my ec2 instance. That causes a problem because websocket runs on TCP and not HTTP/S. The port number also did matter in my case.
Original config (not-working)
New config (working)
I hope this can be of any help in the future. :-)
Upvotes: 7