The problem is that after migrate from Openshift 2 to Openshift 3 I can't get WebSockets communication. Here is the same question but it doesn't work for me.
I've got:
Error during WebSocket handshake: Unexpected response code: 404
After refresh the same page:
Error during WebSocket handshake: Unexpected response code: 503
This is my code
var wsUri ="ws://" + document.location.host + "/scada1WebSockEndpoint"
var websocket = new WebSocket(wsUri);
And it works on my local Apache but does not work on Openshift platform. For me it looks like the websocket doesn't work at all or the wsUri
incorrect.
Any idea?
Well, can't say that the problem solved, but I forced it work at least. I've just changed the type of server inside the Openshit Online 3. From Red Hat JBoss Web Server 3.0 Tomcat 8 to Red Hat JBoss Web Server 3.0 Tomcat 7. So it works now for Red Hat JBoss Web Server 3.0 Tomcat 7 on the cloud and Tomcat 8 on local PC. It means that the problem connects to Tomcat 8. But where could it be? Any idea would be appreciated.