2

We've recently configured a new Cluster with the following configuration:

   www.mydomain.com
           |        
    APACHE + MOD_JK (AJP)
     Load Balancer
      /           \
  Tomcat1      Tomcat2

All the requests are made through HTTPS and the two tomcat instances are using SessionReplication via DeltaManager.

The cluster and all the wep-apps are working just fine.

Now one of these webapps requires the use of WebSockets with WSS:// protocol and i'm getting this exception

java.lang.UnsupportedOperationException: HTTP upgrade is not supported by this protocol

Has anyone ever a clue on what is causing this ?

1

You need to install mod_proxy_wstunnel apache module.

  • so now we are using mod_jk and should migrate to a mod_proxy clustering solution ? Will mod_proxy handle be able to load balance also the WSS:// requests ? – Medioman92 Oct 16 '17 at 12:40
  • moved configuration to mod_proxy and all seems to work fine, thanks – Medioman92 Mar 16 '18 at 10:32
3

As discussed on the tomcat-users mailing list: "[...] the AJP protocol does not support upgrading to other protocols (e.g. websocket, HTTP/2)."

This means you'd have to use some other method of proxying these connections to your Tomcat instances. As Tux_DEV_NULL mentioned you could use mod_proxy_wstunnel for this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.