Skip to content

Web socket fails to connect through Apache #4723

Closed
@lplassman

Description

@lplassman

OS/Web Information

  • Web Browser: Chrome
  • Local OS: MacOS 12.2
  • Remote OS: Ubuntu 20.04 LTS
  • Remote Architecture: amd64
  • code-server --version: 4.0.1

Logs

code-server --log debug
[2022-01-11T03:38:43.612Z] info code-server 4.0.1 735c6da
[2022-01-11T03:38:43.613Z] info Using user-data-dir ~/.local/share/code-server
[2022-01-11T03:38:43.628Z] info Using config file ~/.config/code-server/config.yaml
[2022-01-11T03:38:43.628Z] info HTTP server listening on http://0.0.0.0:8080/
[2022-01-11T03:38:43.628Z] info - Authentication is enabled
[2022-01-11T03:38:43.628Z] info - Using password from ~/.config/code-server/config.yaml
[2022-01-11T03:38:43.628Z] info - Not serving HTTPS
[22:38:51] Extension host agent started.
[22:38:51] [Theme Service] Scanning for theme extension...
[22:38:51] [Theme Service] theme-abyss
[22:38:51] [Theme Service] theme-defaults
[22:38:51] [Theme Service] theme-kimbie-dark
[22:38:51] [Theme Service] theme-monokai
[22:38:51] [Theme Service] theme-monokai-dimmed
[22:38:51] [Theme Service] theme-quietlight
[22:38:51] [Theme Service] theme-red
[22:38:51] [Theme Service] theme-solarized-dark
[22:38:51] [Theme Service] theme-solarized-light
[22:38:51] [Theme Service] theme-tomorrow-night-blue
[22:38:51] [Theme Service] Attempting to find user's active theme: Default Dark+
[2022-01-11T03:38:54.949Z] debug got latest version {"latest":"4.0.1"}
[2022-01-11T03:38:54.949Z] debug comparing versions {"current":"4.0.1","latest":"4.0.1"}
[2022-01-11T03:39:51.007Z] debug 0 active connections

Screenshot

139257954-98741db0-07d2-47f0-a529-fbe57cdd1188
Screen Shot 2022-01-10 at 10 47 35 PM
Screen Shot 2022-01-10 at 10 48 36 PM

Notes

I currently only experience this error on code-server 4.0.1. code-server 3.12.0 works without issue.
I am currently using apache2 with a reverse proxy. The current config for the apache2 virtual host is below:

<Location "/">
ProxyPass http://127.0.0.1:8080/
ProxyPassReverse http://127.0.0.1:8080/
ProxyPassReverse /
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://127.0.0.1:8080/" [P,L]

I also made sure all the websockets modules are loaded in apache2 and working without problems. No errors occur on the Apache web server. Any suggestions on how to get this working with Apache2?

This issue can be reproduced in VS Code: No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghigh-priorityThis issue needs to be resolved ASAP

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions