Container-Native WebSocket Solution

  • Last update:April 24, 2026
  • 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.

    ContainerVersionDescription

    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.

    <!--Modify the web-app element as follows-—
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://xmlns.jcp.org/xml/ns/javaee"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
       id="WebApp_ID" version="3.1">

    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.

    <?xml version="1.0" encoding="UTF-8"?>
    <!--Enable WebSockets -->
    <jboss-web>
       <enable-websockets>true</enable-websockets>
    </jboss-web>

    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.

    Attachment List


    Theme: Decision-making Platform
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy