Websocket in combination with AJP broken behind reverse-proxy in 23.2.
See original GitHub issueDescription of the bug
Previously websocket connections could be forwarded by using a separate location in the httpd configuration like so <Location /web/vaadinServlet/>
allowing this connection to be used with http / websockets - after 23.2 the websockets connection is not routed tho /web/vaadinServlet/
anymore, instead it goes straigth to the /web/?v-r=push...
where the connection can’t be established because /web/**
forwards to AJP, which DOES not support websockets.
Example exception:
'HTTP upgrade is not supported by this protocol' Requested resource was: '/web/?v-r=push&v-uiId=1&v-pushId=0ce8ff89-eae1-4612-9a12-3383167a2d5b&X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=3.1.2-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json;%20charset=UTF-8&X-atmo-protocol=true'
Expected behavior
Websockets should be handled by a separat endpoint /web/vaadinServlet/
like done since V8.
Minimal reproducible example
.
Versions
- Vaadin / Flow version: 23.2
- Java version: 11
- OS version: xx
- Browser version (if applicable):
- Application Server (if applicable):
- IDE (if applicable):
Issue Analytics
- State:
- Created a year ago
- Comments:18 (14 by maintainers)
Top Results From Across the Web
WebSocket not working on Server behind reverse proxy
Hello, erveryone. I've just finished intalling mattermost on a server running CentOS 7 and I'm having some trouble with websockets.
Read more >0 - Stack Overflow
HTTPS breaks Socket.io/websocket connection · Fault description · My environment. Server version: Apache/2.4. · Config files. Nginx reverse proxy ( ...
Read more >Performance behind apache reverse proxy - SourceForge
The AJP protocol does not support WebSocket. That, combined with issues with the PATCH method, etc. have lead us to no longer recommend...
Read more >Using NGINX as a WebSocket Proxy
There are some challenges that a reverse proxy server faces in supporting WebSocket. One is that WebSocket is a hop‑by‑hop protocol, ...
Read more >Set up a reverse proxy server with ArcGIS Notebook Server ...
conf file, use proxy rules to proxy ArcGIS Web Adaptor SSL calls to the AJP port of Tomcat. It's important to also proxy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m fine with that - but I would also highly suggest to create proper reverse proxy documentation for e.g. Apache 2 and nginx until then for people to migrate (@tarekoraby)
@knoobie we have a solution here and currently making a test coverage for it, but the main obstacle for us is that with Jetty we got
ws-disconnect-on-heartbeat
errors, not clear why. Need to figure out the root cause before we apply this patch.