Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection error in websocket over amazon ELB

My service resides in a server which has amazon ELB. The client portion communicates with the server by vertx eventbus. While trying to connect the server following logs pops out

WebSocket connection to 'wss://login.com:7070/Notify/287/mxyox3qd/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

My Code at the client side:

  eventBus = new EventBus(url);
        eventBus.onopen = function() {
                  // ---------- Do Something ---------------------------------
            });

        }

Does ELB listener have something to do with this? can someone help ?

like image 687
Bikram Shrestha Avatar asked Aug 24 '16 12:08

Bikram Shrestha


1 Answers

Elastic Load Balancers don't support web sockets. You need to upgrade to the new Application Load Balancer which does support web sockets.

like image 101
Mark B Avatar answered Sep 18 '22 21:09

Mark B