-
FEATURED COMPONENTS
First time here? Check out the FAQ!
If we define in zk.xml of our production environment (ZKEE 8.6.0.1)
<listener>
<listener-class>org.zkoss.zkmax.au.websocket.WebSocketWebAppInit</listener-class>
</listener>
it doesn't work, the gui is blocked since no communication happens between the client and the server. Everything is ok, instead, in our test environment. What could be the problem? Does the webSocket mechanism use ports that need to be left free or do you need to be careful about something like that?
Since you didn't provide any logs or information about your production setup I can only guess.
In production system you often have a web-server such as httpd or nginx in front of your tomcat (or other application server). This web-server will require some configuration to forward the websocket's upgrade requests to your actual application server.
e.g. here a blog about what needs to be done for nginx https://www.nginx.com/blog/websocket-nginx/
If your application already runs in your test environment I assume the ZK configuration is correct and I'd look for the problem by tracing the network. Starting from the browser network console, into the webserver logs, or the tomcat access logs... somewhere the connection must be refused or failing, which should be visible in the logs.
Asked: 2019-03-11 18:13:34 +0800
Seen: 11 times
Last updated: Mar 12 '19