문제

I 've spent the whole night trying to run a simple echo test on Tomcat 7.

The test I try to run runs locally as expected. But when deployed to the openshift the connection opens and then immediately closed. I've been looking for the right setup on the internet and found questions and answers for them for exactly the same problem but the solutions don't work for me.

The example of what I have as a test can be checked at http://pureikka-belgampaul.rhcloud.com/pi-8/index.html

At the bottom of the viewarea there's a debug console reporting the statsus of the websocket.

So I feel like I have not made a simple mistake in the setup and it runs locally with only the change of the host name and the port number for the websocket.

Could it be a routing trouble after the upgrade of the connection?

I deploy my war file directly to the webapps directory. I also think I got websockets working at one moment but i'm not so sure anymore. I could be looking at the localhost after all.

Eventually I decided to try wildfly8 gear because it ships with support for websockets. I checked out the https://github.com/javaee-samples/javaee7-samples repo and deployed the chat demo to the local wildfly8 and the example worked from the first run as it is supposed. Great. But the same war file fails to work correctly on the openshift (http://wildfly8-belgampaul.rhcloud.com/chat3/)

I tried to use ports 80 or 8000 in both setups. Need someone's help? advice or question to send me back to the right direction

Maybe someone has solved a similar issue?

도움이 되었습니까?

해결책 2

Here are the most useful links providing just enough light about the problem

  1. https://www.openshift.com/blogs/paas-websockets (general info about websockets on openshift)
  2. https://www.openshift.com/blogs/deploy-websocket-web-applications-with-jboss-wildfly (diy example)

to summarize: websocket support out-of-the-box is the most reliable with node.js.

다른 팁

Web Sockets on OpenShift work over ports 8000 for ws and 8443 for wss, it is not a "work around" it's the way websockets work on this system.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top