The web terminal stops responding after 15-30 seconds on gitlab.com
Summary
The web terminal stops responding after 15-30 seconds when on gitlab.com. There's no error in the UI, but an error is logged in the browser console (see below for error).
The same scenario doesn't reproduce on my self-hosted version of gitlab-ce (version 13.2.2, installed via Helm), using the same runner/load balancing configurations
Steps to reproduce
- Deploy cluster in EKS, with NGINX Ingress (configured to use an ELB, with TCP as the protocol to enable websockets)
- Configure NGINX-ingress to expose port 8093 as a TCP port.
- Deploy gitlab runner in Kubernetes cluster with the official helm chart (chart version 0.19.1), passing the runner registry token of the project.
- Manually patch the configmap with the following
session_server
configuration, and restart the pod
[session_server]
listen_address = "[::]:8093"
advertise_address = "TLD:8093"
session_timeout = 1800
- Disable shared runners in the project.
- Navigate to the WebIDE and open the terminal.
Example Project
https://gitlab.com/ramiro-okteto/movies
What is the current bug behavior?
The web terminal stops responding after 15-30 seconds on https://gitlab.com.
What is the expected correct behavior?
I expected the terminal to remain responsive as long as its active
Relevant logs and/or screenshots
console.log on my browser (chrome 84.0.4147.105 on MacOS)
terminal.js:67 WebSocket is already in CLOSING or CLOSED state.
(anonymous) @ terminal.js:67
t.emit @ EventEmitter.js:70
(anonymous) @ Terminal.js:104
e.fire @ EventEmitter2.js:37
t.handler @ Terminal.js:1310
i @ Clipboard.js:30
V9ey.t.pasteHandler @ Clipboard.js:44
t @ Terminal.js:427
r @ helpers.js:71
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Runner logs:
gitlab-com-gitlab-runner-5dd4bdc9c4-k86cjgitlab-com-gitlab-runnerTerminal: started proxying clientAddr=172.31.38.189:51110 serverAddr=10.100.0.1:443
gitlab-com-gitlab-runner-5dd4bdc9c4-k86cjgitlab-com-gitlab-runnerTerminal: error proxying clientAddr=172.31.38.189:51110 error=reading from 172.31.38.189:51110: websocket: close 1006 (abnormal closure): unexpected EOF serverAddr=10.100.0.1:443
gitlab-com-gitlab-runner-5dd4bdc9c4-k86cjgitlab-com-gitlab-runnerTerminal: finished proxying clientAddr=172.31.38.189:51110 serverAddr=10.100.0.1:443
gitlab-com-gitlab-runner-5dd4bdc9c4-k86cjgitlab-com-gitlab-runnerWARNING: Closed active terminal connection builds=0 uri=/session/f0ca2f6bf6a8a883891a0fa4203ddf89ad2672fca7337cff53caf4d9c909886b
Output of checks
This bug happens on GitLab.com
Edited by Ramiro Berrelleza