Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why websocket don't work on the cloud?

I developed our websocket project on wildfly. When we test it on localhost or within our local network, everything work fine. But when I deployed it on AWS, websocket don't work any longer. We can access other html pages. But when we conenct to "ws://ip/project location ", chrome just says hand shake error. I have experienced the same web socket problem on jelastic hosting too. My question is

  1. Why it is happening like this?
  2. Is websocket protocol not stable enough?
  3. Is there any suitable hosting for websocket projects in java?
like image 840
FranXho Avatar asked May 30 '26 01:05

FranXho


1 Answers

So far balancers don't forward websocket headers. To make WS working you must have a public IP address and no other services in front of your application.

like image 104
DiGiTAL Avatar answered May 31 '26 19:05

DiGiTAL



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!