Jsf p:WebSocket握手期间发生套接字错误:意外响应代码:200

Jsf p:WebSocket握手期间发生套接字错误:意外响应代码:200,jsf,primefaces,push,glassfish-4,Jsf,Primefaces,Push,Glassfish 4,我在运行Glassfish 4,EclipseLink 2.5和primefaces 5.3。当我将事件发布到primefaces事件总线并尝试更新我的datagrid组件时,它将在提交浏览器中更新,但在单独的会话(第二个用户)中,更新失败,我在浏览器控制台中看到以下错误: WebSocket connection to 'ws://localhost:8080/myapp/primepush/notify?X- Atmosphere-tracking-id=0&X-Atmosphere

我在运行Glassfish 4,EclipseLink 2.5和primefaces 5.3。当我将事件发布到primefaces事件总线并尝试更新我的datagrid组件时,它将在提交浏览器中更新,但在单独的会话(第二个用户)中,更新失败,我在浏览器控制台中看到以下错误:

WebSocket connection to 'ws://localhost:8080/myapp/primepush/notify?X-
Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.2.12-javascript&   
X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&
X-atmo-protocol=true' failed: Error during WebSocket handshake: 
Unexpected response code: 200
push.js.xhtml?ln=primefaces&v=5.3:1 Websocket closed, reason: 
Connection   was closed abnormally 
(that is, with no close frame being   sent). - wasClean: false
我还看到在服务器上引发此异常:

Warning: StandardWrapperValve[Push Servlet]: 
Servlet.service() for  servlet Push Servlet threw exception
java.io.IOException: 
java.util.concurrent.TimeoutException
我通过这样做来启动活动:

EventBus eventBus = EventBusFactory.getDefault().eventBus();
eventBus.publish("/notify", "price");

EventBus eventBus = EventBusFactory.getDefault().eventBus();
eventBus.publish("/notify", "order");
然后,我用javascript处理这些问题,并通过remotecommand进行更新:

<script type="text/javascript">
            function handleMessage(data) 
            {
                console.log("handle message fired")
                console.log(data);
                if(data == 'order')
                {
                    console.log("data is order");
                    checkOrders();
                }

                if(data == 'price')
                {
                    console.log("data is price");
                    updateWidget();
                    updateBalance();
                }
            } 
    </script>

<p:remoteCommand name="updateWidget"
             actionListener="#{parliamentManager.findLatestPrices}"
             update="prices"
             autoRun="true"/>

<p:remoteCommand name="updateBalance"
             actionListener="#{parliamentManager.findTraders}"
             update="balance"
             autoRun="true"/>

<p:remoteCommand name="checkOrders"
             actionListener="#{parliamentManager.checkOrders}" /> 
</h:form>
<p:socket onMessage="handleMessage" channel="/notify" />

函数句柄消息(数据)
{
log(“处理已触发的消息”)
控制台日志(数据);
如果(数据=‘顺序’)
{
console.log(“数据是命令”);
支票订单();
}
如果(数据=‘价格’)
{
console.log(“数据即价格”);
updateWidget();
updateBalance();
}
} 
这是我的datagrid组件:

<h:panelGroup id="resultDisplay">                          
            <p:dataGrid id="prices" var="orderBooks" value=
            "#{parliamentManager.latestPricesResults}" columns="3" rows="12">
                <p:column>
                <p:panel header="#{orderBooks.bidOrderId.member.memberId}">
            <h:panelGrid columns="1">
            <h:outputText value="#{orderBooks.price}" />
            </h:panelGrid>
            </p:panel>
            </p:column>
        </p:dataGrid>


回到我的开场白,为什么我对datagrid组件的更新在提交浏览器中成功了,但在另一个示例中,更新失败了,我看到了错误消息?

我通过将Glassfish的版本更新到4.1.1(版本1)来解决这个问题,原来的版本很旧(2014年).

因此,请用glassfish标记上述问题,并提供您升级到哪个版本的信息(我们应该猜测吗?)