-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Che Terminal Window Won't Connect #19201
Comments
The similar issue was reported recently #19124 |
@dymart I assume the problem also extends to executing Che commands? |
Hi @tsmaeder, I'm not exactly sure what you mean by executing Che commands in this context. If you could provide an example I could test it against my deployment and see what happens. Hopefully this could help narrow down the problem. Thanks |
This sounds similar to what I am also experiencing. Deployed on Openshift 4 if you leave the terminals / commands open they won't rehook after restarting the workspace, seems like they are using the old routes/ingress which has been deleted and recreated upon stopping and starting the workspace. Within the browser development tools I can see calls to a wss url, but checking the openshift console, that route doesn't exist anymore. So possibly something is caching the previous route/ingress to the jwtproxy and not getting the current sessions routes. |
@dymart I mean commands you can define in the devfile. They show up in the "My Workspace" sidebar on the right. |
@tsmaeder thanks for the clarification. I could not execute those commands either when the workspace was experiencing connection problems with terminal. The same WebSocket connection to 'wss{ old ingress}' failed error was present when trying to execute those commands as well. Hopefully this helps |
@dymart @benoitf @azatsarynnyy @tsmaeder Sure we cache the value for
To investigate the issue I added a request to get the actual value of
Unfortunately I couldn't reproduce the issue. I think you could:
or use
So:
|
Hi @RomanNikitenko, Thank you for looking into it! I will try upgrading to the dogfooding instance and hopefully I can get the same outcome you had and the problem will not be there. If there is a problem I will try your recommendations to get more information to help with debugging and post it back here. Thanks for linking to the devfile and creating an image to make debugging easier. That is really appreciated! |
Most likely, this PR eclipse-che/che-theia#1036 fixes the issue. |
@dymart |
I found the reliable way to reproduce the issue: eclipse-che/che-theia#1036 (comment) |
@RomanNikitenko @azatsarynnyy Thank you to everyone who looked into this issue! Hopefully we can close this issue once it's resolved in a nightly release or in the 7.28 release it seems to have been added to! |
@dymart you can check if it fixed on your side. Just switch che-theia to components:
- id: eclipse/che-theia/next
type: cheEditor |
I'm closing it as fixed by eclipse-che/che-theia#1036 |
@azatsarynnyy and when I try to upgrade:
I can't open new terminals and get the errors: logger-protocol.ts:112 root ERROR Failed to create terminal widget. Cause: TypeError: Cannot read property 'toString' of undefined exec-terminal-contribution.ts:209 Uncaught (in promise) Error: Unable to create new terminal for machine: theia-ide8oi |
@dymart Could you try like here:
|
@RomanNikitenko I wonder what is https://che-plugin-registry-main.surge.sh/v3 |
it's workaround. |
@RomanNikitenko Thank you @RomanNikitenko, @azatsarynnyy and everyone else who helped with this! |
Describe the bug
The terminal connection is inconsistent after a workspace is stopped and started again.
When the workspace is first created everything works great but when the workspace is stopped and started again there is regularly a problem connecting to the terminal window in a workspace. Everything else works correctly and you can browse files and edit them but opening a terminal window in a container only results in a blank terminal window.
Che version
the version of che is 7.26.2 installed with the operator also 7.26.2
Steps to reproduce
Expected behavior
After restarts workspace terminal connects consistently.
Runtime
kubernetes ( version 1.17 and 1.18, tested separately ) instillation
nginx (app.kubernetes.io/version: 0.41.0) as a proxy.
Installation method
che operator 7.26.2
Environment
this was reproduced on both gke and azure
Eclipse Che Logs
If you open dev tools in your browser and the terminal is not connecting you can see an error that says:
WebSocket connection to 'wss:// {che jwtproxy server url} {token} failed:
The che jwtproxy server url during an error is usually an old or incorrect version of the url so that inigress does not exist anymore.
I have not encountered a terminal problem that did not come from calling the wrong url from websocket. This would say that the logic for terminal connection is correct and there is simply a problem passing or making sure that websocket calls the correct url.
Additional context
After trying to find the root cause of the issue for a while I might have an idea where this comes from. The {che jwtproxy server} url is created and destroyed each time the workspace is created stopped or deleted. When it's recreated it's named after the service that it is routing to ex: url: serverfeeclvsk-jwtproxy-server-4400 = service: serverfeeclvsk-jwtproxy. But after creating stopping and deleting workspaces a few times it seems as though the url is not correctly propagated through after it has changed on a restart. This causes a problem because the websocket cannot connect to the pod. But no errors show up anywhere because it's not even trying to contact the right ingress. The old ingress it's trying to contact doesn't exist anymore.
Service that websocket tries to connect to:
{service name for jwtproxy changes each time}-jwtproxy-server-4400.{custom domain}
ex.
server5etxiotr-jwtproxy-server-4400.{custom domain}
This problem can infrequently be resolved by reloading the page or restarting the workspace but this is not guarenteed and creates frustration for a user. I've tried reloading and restarting workspaces multiple times after encountering this error ternminal error only to eventually delete the workspace and create it again.
I really enjoy using eclipse che and hope this helps to find the root cause of the problem. Thanks
The text was updated successfully, but these errors were encountered: