You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start code-server on port 8080, auth none for testing. code-server --verbose --auth none
Start component gateway on console so that you can see the logs. user@codeserver-test-m:~$ /usr/bin/proxy-forwarding-agent -proxy https://us-central1.dataproc.cloud.google.com/tun/m/<a-hex-string>/ -host localhost:8080 -backend xxxxxxxxxx -session-cookie-name=_xsrf -shim-path websocket-shim
Use dataproc url to access code server using browser. Eg: https://xxxxxxxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com and observe the logs
Outcome
On browser:
TRACE [remote-connection][Management ][d2d47…][initial][WebSocket(xxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com:443)] 1/6. invoking socketFactory.connect(). log.ts:419
INFO Creating a socket (renderer-Management-d2d47e5e-d55e-469d-aea3-9ccdd1b4091e)... log.ts:419
INFO Creating a socket (renderer-Management-d2d47e5e-d55e-469d-aea3-9ccdd1b4091e) was successful after 1568 ms. log.ts:399
TRACE [remote-connection][Management ][d2d47…][initial][WebSocket(xxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com:443)] 2/6. socketFactory.connect() was successful. log.ts:399
TRACE [remote-connection][Management ][d2d47…][initial][WebSocket(xxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com:443)] 3/6. sending AuthRequest control message. log.ts:399
TRACE [remote-connection][Management ][d2d47…][initial][WebSocket(xxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com:443)] 4/6. received SignRequest control message. log.ts:399
TRACE [remote-connection][Management ][d2d47…][initial][WebSocket(xxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com:443)] 5/6. sending ConnectionTypeRequest control message. log.ts:439
ERR [remote-connection][Management ][d2d47…][initial][WebSocket(xxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com:443)] received error control message when negotiating connection. Error: log.ts:439
ERR Error: Connection error: Malformed second message
at H (remoteAgentConnection.ts:783:17)
at u.value (remoteAgentConnection.ts:326:17)
at a.B (event.ts:1211:13)
at a.fire (event.ts:1242:9)
at n.fire (ipc.net.ts:650:19)
at b.z (ipc.net.ts:1022:28)
at u.value (ipc.net.ts:876:72)
at a.B (event.ts:1211:13)
at a.fire (event.ts:1242:9)
at h.acceptChunk (ipc.net.ts:394:21)
On Console (code-server logs)
user@codeserver-test-m:~$ code-server --bind-addr 127.0.0.1:8080 --verbose --auth none
[2024-11-04T12:40:34.393Z] debug parent:10764 spawned child process 10782
[2024-11-04T12:40:34.758Z] debug child:10782 initiating handshake
[2024-11-04T12:40:34.762Z] debug parent:10764 got message {"message":{"type":"handshake"}}
[2024-11-04T12:40:34.764Z] debug child:10782 got message {"message":{"type":"handshake","args":{"bind-addr":"127.0.0.1:8080","auth":"none","password":"<redacted>","config":"/home/user/.config/code-server/config.yaml","verbose":true,"user-data-dir":"/home/user/.local/share/code-server","extensions-dir":"/home/user/.local/share/code-server/extensions","session-socket":"/home/user/.local/share/code-server/code-server-ipc.sock","log":"trace","host":"127.0.0.1","port":8080,"proxy-domain":[],"_":[],"usingEnvPassword":false,"usingEnvHashedPassword":false}}}
[2024-11-04T12:40:34.765Z] info code-server 4.91.0 fb3e3e1546d571e9973e86482bcd925c1918ec27
[2024-11-04T12:40:34.765Z] info Using user-data-dir /home/user/.local/share/code-server
[2024-11-04T12:40:34.765Z] debug Using extensions-dir /home/user/.local/share/code-server/extensions
[2024-11-04T12:40:34.787Z] info Using config file /home/user/.config/code-server/config.yaml
[2024-11-04T12:40:34.787Z] info HTTP server listening on http://127.0.0.1:8080/
[2024-11-04T12:40:34.787Z] info - Authentication is disabled
[2024-11-04T12:40:34.787Z] info - Not serving HTTPS
[2024-11-04T12:40:34.787Z] info Session server listening on /home/user/.local/share/code-server/code-server-ipc.sock
....
….
[12:45:02] [127.0.0.1][6b8b0d5b] Malformed second message
...
Component gateway logs
user@codeserver-test-m:~$ /usr/bin/proxy-forwarding-agent -proxy https://us-central1.dataproc.cloud.google.com/tun/m/<a-hex-string>/ -host localhost:8080 -backend xxxxxxxxxx -session-cookie-name=_xsrf -shim-path websocket-shim
2024/11/04 13:47:42 Skipping metric handler initialization due to empty arguments.
2024/11/04 13:49:19 Websocket connection to the server "ws://localhost:8080/stable-090e0fad76152d6a0c10903a3bbf8a83d09e93d0?reconnectionToken=b5d11bcd-da5c-4e94-8b6a-8badae78dfe3&reconnection=false&skipWebSocketFrames=false" established for session: 1
2024/11/04 13:49:55 Websocket failure: failed to read a websocket message from the server: websocket: close 1006 (abnormal closure): unexpected EOF
The text was updated successfully, but these errors were encountered:
Problem description:
When I try to access code-server behind inverting proxy, I get the page loaded with websocket errors.
Dataproc Image : Ubuntu 20.04
Browser : MS Edge
Code server version : 4.91.0
Steps to reproduce:
google-dataproc-component-gateway
andknox
servicessudo systemctl stop knox google-dataproc-component-gateway
code-server --verbose --auth none
user@codeserver-test-m:~$ /usr/bin/proxy-forwarding-agent -proxy https://us-central1.dataproc.cloud.google.com/tun/m/<a-hex-string>/ -host localhost:8080 -backend xxxxxxxxxx -session-cookie-name=_xsrf -shim-path websocket-shim
https://xxxxxxxxxxxxxxx-dot-us-central1.dataproc.googleusercontent.com
and observe the logsOutcome
On browser:
On Console (code-server logs)
Component gateway logs
The text was updated successfully, but these errors were encountered: