Primefaces p:Apache24和AJP推送

Primefaces p:Apache24和AJP推送,primefaces,atmosphere,ajp,primepush,Primefaces,Atmosphere,Ajp,Primepush,我在使用Apache24的Tomcat上遇到了问题 下面是显示的错误: java.lang.UnsupportedOperationException: HTTP upgrade is not supported by the AJP protocol 下面是web chrome控制台中的错误 WebSocket connection to 'wss://myhost.com/primepush/customers/org?X-…ransport=websocket&X-Atmosph

我在使用Apache24的Tomcat上遇到了问题

下面是显示的错误:

java.lang.UnsupportedOperationException: HTTP upgrade is not supported by the AJP protocol
下面是web chrome控制台中的错误

WebSocket connection to 'wss://myhost.com/primepush/customers/org?X-…ransport=websocket&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true' failed: Error during WebSocket handshake: Unexpected response code: 500
Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). - wasClean: false
Websocket failed on first connection attempt. Downgrading to long-polling and resending
我读到AJP协议不支持升级到其他协议 协议(例如websocket、HTTP/2)。我可能需要设置反向代理,但我对如何正确设置有点困惑。有人有这方面的经验吗

注意:如果我不使用Apache,只使用普通HTTP,这是可行的

此ws的当前反向代理设置:

LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

ProxyPass         /primepush/  ws://localhost:8080/primepush/
ProxyPassReverse  /primepush/  ws://localhost:8080/primepush/
我还将连接器添加到tomcat中

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
以下是ws-module的状态:

 proxy_wstunnel_module (shared)
我还发现了一些奇怪的事情:

  • 当我第一次进入有此推送的页面时(使用链接),它工作正常,日志中没有错误,控制台web中也没有错误。推力也能正常工作
  • 但是当我刷新该页面时,错误会出现在控制台和error.log中。在网络上显示得到。。。505错误。它还显示了chrome控制台中的警告:主线程上的同步XMLHttpRequest被弃用,因为它对最终用户的体验有不利影响

附加信息:推送正在工作,但没有消息表明它将降级进行投票,但我真的很担心这个错误的根本原因和影响。

找出“大气”应该如何处理,你就有了PrimeFaces推动解决方案,因为这就是它的基础on@Kukeltje我实际上遵循反向代理上的修复(这对我不起作用)如果你知道问题出在哪里,我会更详细地更新我的配置。
 proxy_wstunnel_module (shared)