Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1849354[details]
Apache error log on the host
Created attachment 1849354[details]
Apache error log on the host
Created attachment 1849354[details]
Apache error log on the host
Created attachment 1849354[details]
Apache error log on the host
Description of problem:
When trying to reach a container running inside a virtual machine, the websocket connection closes prematurely.
I believe this causes by the Apache reverse proxy (on the host) not handling the rewrite of the websockets correctly.
Steps to Reproduce / the setup:
Diagram
Internet <--> Host with a reverse proxy <--> virtual machine with a container
Host configuration:
RHEL 8.5
Apache 2.4.37
VirtualHost/reverse proxy on the host:
<VirtualHost *:3000>
ServerName [my.domain.com]
LogLevel trace8
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://192.168.122.237:3000/$1 [P,L]
ProxyPreserveHost On
ProxyPass / http://192.168.122.237:3000/
ProxyPassReverse / http://192.168.122.237:3000/
SSLCertificateFile /etc/letsencrypt/live/[my.domain.com]/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/[my.domain.com]/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLEngine on
</VirtualHost>
Virtual machine configuration:
RHEL 8.5
A container with OpenVSCode (an open source online IDE)
The container is run with the following command:
sudo podman run -it --init -p 3000:3000 -v "$(pwd):/var/www/html:cached" gitpod/openvscode-server
When I open the address:
https://[my.domain.com]:3000/?tkn=[security token]
I get the following error message:
"The workbench failed to connect to the server (Error: WebSocket close with status code 1006)"
After a discussion with the developers of OpenVSCode (see links below) and a specialist from the Apache mailing list, I have to conclude that the Apache rewrites rules don't seem to work correctly in combination with websockets.
With the rewrite rules I mean the following directives in the VirtualHost / reverse proxy:
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://192.168.122.237:3000/$1 [P,L]
After sending my Apache error log (1. see attachment, 2. LogLevel trace8 was enabled), this is what the specialist from the Apache mailing list said: "It appears the backend closes the websockets tunnel immediately."
According to the developers of OpenVSCode my reverse proxy configuration is fine and the problem can only be solved by upgrading to Apache 2.4.48 or later. However, I can't do that because RHEL 8.5 only supports Apache 2.4.37.
I don't know what exactly goes wrong in the background and what solved the problem in later versions of Apache (if this is true), but I do hope that the fix (whatever it is/was) can be backported to version 2.4.37.
Discussion on Github with the developers of OpenVSCode:
https://github.com/gitpod-io/openvscode-server/discussions/278https://github.com/gitpod-io/openvscode-server/discussions/96
The complete documentation of my setup can be found here:
https://jeroenverhoeckx.com/build-your-own-online-ide.html
I don't write this bug report in order to solve my problem, but I sincerely believe that it's a more general problem.
Let me know if there something that I could do to help solve this possible bug!
And if it's not a bug, I also would like to hear it (and hopefully find a workaround)!
Will this problem be solved in RHEL 8.6?
How can I get attention for the bug report?
Comment 6RHEL Program Management
2023-07-06 07:28:06 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.