EAP 6.4 & WebSockets with web server

Latest response

Hello, I already tried to ask about this here but since I haven't received any satisfactory response so far, I'm trying it here as well:

Based on:
- 16.2. Create a WebSocket Application
- Does JBoss EAP support the use of WebSockets?
- JBoss Enterprise Application Platform (EAP) 6 Supported Configurations - Red Hat Customer Portal
- Does Red Hat / JBoss offer support for Apache, mod_jk, mod_proxy, or mod_cluster? - Red Hat Customer Portal (by the way why does this one mention mod_proxy as supported when the Supported Configurations document above doesn't mention mod_proxy at all?)
- 4. Unsupported and Deprecated Features
- Add support of websocket proxying. · modcluster/mod_cluster@e801c55 · GitHub
- Make the websocket proxy switchable. · modcluster/mod_cluster@f1f68c5 · GitHub

It seems that:
- EAP 6.4 itself supports WebSockets
- supported web server connectors mod_cluster 1.2.11 / mod_jk 1.2.40 don't support WebSockets
- mod_cluster 1.3.1 supports WebSockets (without failover) via Apache HTTP Server 2.4.x mod_proxy_wstunnel but this configuration isn't supported by EAP 6.4
- Apache HTTP Server 2.4.x mod_proxy_wstunnel alone (well, typically combined with mod_proxy_http + mod_proxy_balancer) supports WebSockets but this configuration isn't supported by EAP 6.4

How is one supposed to achieve a supported configuration with web server and WebSockets?

Petr Hostalek's picture


Hi Petr

I did see your question on the community forums but I didn't get much more information to update you unfortunately at the time. What I've done is reached out to our engineers in this area who are discussing this with product management. We appreciate your research in to the supported configurations, at the moment it looks like you are right and this isn't supported.

Like I said, our product team will be in touch as soon as they have more information regarding your question and be able to provide much more information.


Hello again,

I'd like to apologize for the lull in my responsiveness. I just wanted to drop by and make a statement as I've had conversations around this post in support cases with a few individuals.

JWS 3.x is not presently supported as a proxy to EAP. It may work, but we haven't tested it at this time and therefore can't support it's use. We are working on testing this and will be supporting JWS as a proxy to EAP in a later 3.x release. Please reply with any questions; I'd be happy to answer them, hopefully a bit quicker than this reply


According to the latest update in https://access.redhat.com/articles/2026253, websocket is supported in the combination of mod_cluster 1.3.1.Final + EAP 6.4. Also, there's someone verified the function of loadbalancing WebSocket connection with modcluster: https://developer.jboss.org/thread/260794 (last comment of the thread)


That article (https://access.redhat.com/articles/2026253) is for EAP 7 only.

For EAP 6 is this one: https://access.redhat.com/articles/111663

And it says that requires EAP 6.4.4 and above to use mod_cluster 1.3.1.Final or 1.3.5.Final. Although, that page is not like the EAP 7 one that says it works with WebSocket protocol.

Am I right?



And it's rather interesting that:

https://access.redhat.com/solutions/47442 (which is supposed to cover information for EAP 6 & 7 as well) claims: WebSockets are not currently supported with mod_cluster

https://access.redhat.com/articles/2026253 (for EAP 7) covers the mod_cluster 1.3.5 & WebSockets as supported (well, actually it's claimed as tested) configuration

That's quite confusing regarding how to look at the mod_cluster 1.3.1/1.3.5 support in EAP 6.4.4 - whether this means that one can assume WebSockets are supported in EAP 6.4.4 with mod_cluster 1.3.1/1.3.5 as well.

Hello Petr,

It's true that Websocket should work with mod_cluster 1.3.1/1.3.5 but there's a bug: JBCS-291

It is related to JBCS and mod_clsuter. Look at the comments and you can follow it to receive any news about it.

Later we will look at the solutions and articles described here and update with that information to avoid misunderstandings.


Arthur Ferreira

I have experience in the same environment.

Apache HTTPD + mod_cluster or mod_jk + JBoss EAP 6.x / 7.x

I have used websocket in the above environment.

In conclusion, it is impossible to use websocket in this configuration.

To enable it, the websocket url must use wstunnel separately.

I solved the problem with wstunnel without using mod_cluster and mod_jk as shown below.

# This file configures all the proxy modules:
LoadModule proxy_module modules/mod_proxy.so
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so

# Websocket connection
<Proxy balancer://TEST_WS>
    BalancerMember ws:// route=node11 timeout=3 retry=30
    BalancerMember ws:// route=node21 timeout=3 retry=30
    ProxySet stickysession=JSESSIONID|jsessionid lbmethod=byrequests failontimeout=on

# AJP connection
<Proxy balancer://TEST_AJP>
    BalancerMember ajp:// route=node11 timeout=3 retry=30
    BalancerMember ajp:// route=node21 timeout=3 retry=30
    ProxySet stickysession=JSESSIONID|jsessionid lbmethod=byrequests failontimeout=on

# HTTP connection
<Proxy balancer://TEST_HTTP>
    BalancerMember route=node11 timeout=3 retry=30
    BalancerMember route=node21 timeout=3 retry=30
    ProxySet stickysession=JSESSIONID|jsessionid lbmethod=byrequests failontimeout=on

RewriteEngine On

# WebSocket request process
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /jboss-websocket-hello/(.*)               balancer://TEST_WS/jboss-websocket-hello/$1 [P,L]

# HTTP request process
ProxyPass /jboss-websocket-hello balancer://TEST_AJP/jboss-websocket-hello
ProxyPassReverse /jboss-websocket-hello balancer://TEST_AJP/jboss-websocket-hello

Also, when using wstunnel, it is not recommended to use it with mod_cluster or mod_jk. In my experience, I remember that there was a problem in part.


Yes I know it works that way (actually I wrote it into the original question and repeated it in the discussion https://developer.jboss.org/thread/260794 a long time ago that it does), however this question was mainly directing at the supportability. The thing is that the "supported configurations" article https://access.redhat.com/articles/111663 basically mentions only mod_cluster and mod_jk as supported web server reverse proxy modules and thus the use of mod_proxy (+ mod_proxy_wstunnel) doesn't seem to fall into the "supported" configuration.

Now it seems that with EAP 6.4.4+ the mod_cluster 1.3.1 (the minimum version required for WebSockets support) is supported (also 1.3.5 is), however the WebSockets still don't seem to be supported with this module (probably because of the mentioned https://issues.jboss.org/browse/JBCS-291 )

Was this helpful?

We appreciate your feedback. Leave a comment if you would like to provide more detail.
It looks like we have some work to do. Leave a comment to let us know how we could improve.

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.