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!
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. :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With