Enable websocket tomcat on ELB

397 views Asked by At

Can't seem to find out a solution for this, but when I running my application on tomcat behind a load balancer, I get this below error:

ERROR cpr.AsynchronousProcessor - Invalid request state. Websocket protocol not supported.

Note :-

Enabled the proxy protocol using below command.

#aws elb create-load-balancer-policy --load-balancer-name Mag-ELB --policy-name EnableProxyProtocol --policy-type-name ProxyProtocolPolicyType --policy-attributes AttributeName=ProxyProtocol,AttributeValue=True

created policy to the back-end instance port.

#aws elb set-load-balancer-policies-for-backend-server --load-balancer-name Mag-ELB --instance-port 80 --policy-names EnableProxyProtocol

1

There are 1 answers

0
gfernandes On

I didnt set this policy and managed to run the websocket with tomcat 7 behind AWS ELB by setting Load Balancer Port = 80 and Instance Port = 80 (Procotol TCP).

I didnt get to make this work with SSL though.