question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Websocket in combination with AJP broken behind reverse-proxy in 23.2.

See original GitHub issue

Description 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:closed
  • Created a year ago
  • Comments:18 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
knoobiecommented, Sep 28, 2022

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)

1reaction
mshabarovcommented, Nov 14, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found