Overview
Version
| Report Server Version |
|---|
11.0 |
Application Scenario
This document introduces how to configure WebSocket ports in a standalone environment.
Note: Starting from the FineReport project of V11.0.2 and later versions, a container-native WebSocket solution has been added. You are advised to first check if the Container-Native WebSocket Solution can be used.
No user operation, manual configuration, or additional port is required. The system automatically uses the WebSocket implementation built into the web container for connection, and the WebSocket connection reuses the HTTP port.
Example
Modifying Field Values
You (the super admin) can modify the WebSocket port through the FINE_CONF_ENTITY Visualization Configuration plugin. The settings take effect after you restart the server.
Note: | Port | JAR Package | ID | Default Value | Value Range | Multi-Value Support |
|---|---|---|---|---|---|
WebSocket port | / | WebSocketConfig.port | ["38888", "39888"] | An array of ports: ["Port number 1", "Port number 2"] All port numbers should fall within the range (1024, 65535]. | Supported |
WebSocket forwarding port | Dated before 2019-11-08 | WebSocketConfig.requestPort | 38889 | Supported | |
Dated after 2019-11-08 | WebSocketConfig.requestPorts | 38889 | Supported |
Notes for port configuration:
1. The port number ranges from 1024 (excluded) to 65535. Separate multiple values with commas (,), for example, [Port number 1, Port number 2, Port number 3].
2. You are advised to configure multiple values for the WebSocket port as backups to prevent port conflicts when multiple projects are deployed on a single server.
3. Do not set the port number to 3389 (which is for remote server connection).
5. Do not set the WebSocket port and WebSocket forwarding port to the same port number.
5. If there are trailing spaces in WebSocketConfig.port, WebSocketConfig.requestPort, and WebSocketConfig.requestPorts, the configuration will not take effect.
6. The parameters WebSocketConfig.port, WebSocketConfig.requestPort, and WebSocketConfig.requestPorts are case-sensitive. Wrong capitalization will prevent the configuration from taking effect.
7. WebSocketConfig.requestPort and WebSocketConfig.requestPorts must not coexist in the fine_conf_entity table; otherwise, errors will occur.
Opening Ports
If the firewall is enabled, you can either disable it or open the specific port.
If the cloud server uses security groups or similar access controls, open the required ports to external traffic.
Restarting the Project
Restart the FineReport project.
When restarting the project, kill the running project processes, wait 2 minutes for ports to be released, and then restart the project. Otherwise, the restart may fail.
Effect Preview
The report server listens for connections in the following order: WebSocket port >> WebSocket forwarding port. That is, with default ports, 38888, 39888, and 38889 are tried in sequence.
If a port is successfully bound, the report server will stop trying other ports.

If none of the configured ports can be bound to the system server, the deployment wizard will open to guide you through modifying the listening port list. Related functions will be affected during this time.
In this case, reconfigure the WebSocket port and WebSocket forwarding port until an available port is found.
