Bug 55890 - mod_proxy_wstunnel does not work with reused backend connections
Summary: mod_proxy_wstunnel does not work with reused backend connections
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.7
Hardware: All All
: P2 major with 2 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: FixedInTrunk
Depends on:
Reported: 2013-12-16 14:06 UTC by Henning Boeger
Modified: 2014-08-18 07:54 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Henning Boeger 2013-12-16 14:06:43 UTC
I am running websocket connections via mod_proxy_wstunnel to a backend application server. Apache works as a reverse proxy.

After running for some time, I get 500 errors from the backend server for new client connection attempts.

Root cause is that mod_proxy_wstunnel reuses the connections to the backend server.

When the client attempts a new connection, mod_proxy_wstunnel forwards the initial GET request of the websocket handshake to the backend, on a connection which has already been handshook. The backend server is not prepared for a new handshake on a handshook connection and replies with a 500 error.

Use disablereuse=on for the ProxyPass directive.

Possible solutions:
I think connection reuse should be disabled altogether for websocket connections (except the websocket protocol somehow allows it). mod_proxy_wstunnel should either fail on startup when connection reuse is enabled, or alternatively, always request a fresh backend connection, regardless of the disablereuse setting.
Comment 1 Eric Covener 2014-04-13 16:57:55 UTC
Thanks for the report, will propose for 2.4.x soon.
Comment 2 Christophe JAILLET 2014-08-18 07:54:04 UTC
Fixed and released in 2.4.10