Overview
Version
| Report Server Version |
|---|
11.0.2 |
Application Scenario
To simplify WebSocket configuration, starting from the FineReport project of V11.0.2 and later versions, a container-native WebSocket solution has been added.
This solution uses the WebSocket implementation built into the Web container for connection, reusing the HTTP port. No additional port or manual configuration is required.
When the project supports the container-native WebSocket solution, the client tries the solution first. If the connection attempt fails, it falls back to the old socket.io solution.
Implementation Step
The container-native WebSocket solution requires the following prerequisites.
Container Environment Check
The container-native WebSocket solution is only supported for the following containers.
| Container | Version | Description |
|---|---|---|
Tomcat | V8.5 to V9.0 | / |
WebLogic | 12c and later versions | You need to modify the namespace of web.xml, and keep other settings unchanged. |
WebSphere | V9 and later versions | / |
JBoss | EAP 6.4+ WildFly 9+ | For JBoss EAP 6.4, you need to modify the configuration: Add a jboss-web.xml file to the WEB-INF directory. Modify the standalone.xml file in ${hboss_home}/standalone/configuration by changing protocol="HTTP/1.1" to protocol="org.apache.coyote.http11.Http11NioProtocol". |
If the container hosting the project meets the prerequisites, WebSocket Settings will not appear under Management System > System Administration > General on the decision-making platform.

Load Balancer Configuration
nginx
1. Modify the HTTP configuration.
Add the following directives to every location block:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;

2. Check whether nginx has been configured for WebSocket connections.
Open the nginx.conf file and check if it contains the following content.
server {
#WebSocket port. In clustered deployments, FineReport projects use 38889, and FineB projects use 48889.
listen 38889;
server_name 192.168.6.181;
location / {
proxy_http_version 1.1;
proxy_pass http://WBS.com;
proxy_connect_timeout 75;
proxy_read_timeout 400;
proxy_send_timeout 400;
#Target protocol to upgrade to; $http_upgrade resolves to websocket in this example.
proxy_set_header Upgrade $http_upgrade;
#Set Connection to "upgrade" to enable the Upgrade header.
proxy_set_header Connection "upgrade";
}
}
If the above content does not exist, it indicates that nginx has not been configured for WebSocket connections. You can directly use the container-native WebSocket solution.
If the above content exists, it indicates that nginx has been configured for WebSocket connections. You need to delete the above content, as shown in the following figure.

Traefik
No additional configuration is required. Retaining or deleting the original WebSocket configuration does not affect the implementation of the container-native WebSocket solution.
F5
No additional configuration is required. Retaining or deleting the original WebSocket configuration does not affect the implementation of the container-native WebSocket solution.
Browser Environment
The container-native WebSocket solution is supported by browsers including Google Chrome, Firefox, Microsoft Edge, and Internet Explorer 10 and later versions.
It is not supported by Internet Explorer 9 and earlier versions.