Bug 66870 - Websocket Reverse proxy pass failing on socket close
Summary: Websocket Reverse proxy pass failing on socket close
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_wstunnel (show other bugs)
Version: 2.4.57
Hardware: All Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-08 23:38 UTC by ben
Modified: 2023-08-21 09:55 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ben 2023-08-08 23:38:30 UTC
The following error's are outputted into the apache log when using apache as a reverse proxy to a websocket server

[Wed Aug 09 00:27:33.940022 2023] [proxy:error] [pid X:tid X] (70014)End of file found: [client X.X.X.X:X] X: ap_proxy_transfer_between_connections: error on origin - ap_pass_brigade
[Wed Aug 09 00:27:33.940073 2023] [proxy:error] [pid X:tid X] [client X.X.X.X:X] X: proxy: websocket: client flushing failed (-1

This appears when the connection is closed by the websocket client

Config used:

  ProxyPass "/websocket/" "ws://localhost:8443/"
  ProxyPassReverse "/websocket/" "ws://localhost:8443/"
Comment 1 Ruediger Pluem 2023-08-21 09:35:31 UTC
Looks like to me the server still sends data while the client just closed the connection. In this case these errors are expected. Probably setting the environment variable proxy-nohalfclose via setenv will prevent these messages.
Comment 2 ben 2023-08-21 09:45:39 UTC
Thanks for the reply,

Is this an expected change between 2.4.56 (Debian) and 2.4.57 (Debian)

On .56 I do not get this behaviour and has only started on .57,

Thanks
Comment 3 Ruediger Pluem 2023-08-21 09:55:34 UTC
I don't see any changes related to this in vanilla httpd, but I cannot speak for Debian packages. You would need to ask the Debian team on this.