-
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-code - Open IDE redirects too fast: Bad Gateway
#21099
che-code - Open IDE redirects too fast: Bad Gateway
#21099
Comments
might be an issue related to #20481 I'm also facing the issue |
Bad Gateway
Bad Gateway
issue is not inside the editor because after few time the route is working fine it's related to route availability |
@amisevsk @sparkoo how is the route flagged as ready ? it seems that route is flagged as ready before traefik is able to reach the endpoint ? I get rid of the connectionToken parameter so CheCode endpoint should return either 200 or nothing if not yet started For Red Hatters it can be reproduce with https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/#https://github.com/che-incubator/che-code |
On the DWO side, the DevWorkspace is not marked as "started" until Testing locally, I'm seeing that |
I also get that with Che Theia from time to time (it just happened). |
of course that che-code is serving this endpoint (hitting refresh few seconds later after the 'bad gateway' message just works fine) |
it looks like healthz may say that che-code is ok to receive requests but traefik is not yet updated to handle that route then it fails |
I don't know if it's relevant in this case, but note that issues with |
401 response is gone in the latest builds (there was a mandatory token in previous builds) so 401 could happen before but not anymore (as token is not required) |
BTW it looks still odd as 404 can be accepted as a success b/c if theia or code is not launched, it will return a 404 during their startup it looks like some race condition: someone notify it's ready while the traefik route is not |
PR eclipse-che/che-operator#1309 should resolve this issue (tested briefly, at least). Changes are available in image However, on the topic of Theia: bash-5.0$ curl http://localhost:3100/healthz -I
HTTP/1.1 404 Not Found Che-code: bash-4.4$ curl http://localhost:3100/healthz -i
HTTP/1.1 404 Not Found
Content-Type: text/plain
Date: Wed, 02 Feb 2022 20:33:22 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
Not found. c.f. Web terminal, for example: bash-4.4 ~ $ curl -k https://localhost:4444/healthz -i
HTTP/2 200
content-length: 0
date: Wed, 02 Feb 2022 20:33:02 GMT |
But healthz is not managed by theia or code. There is no such endpoint |
Ah, sorry -- I was confused. It seemed like you were saying that Theia/Che-code were serving A more proper solution for readiness/liveness checks would be devfile/api#168 |
But for exemple why is it not checking the path of the main endpoint ? Like / instead of /healthz ? |
HEAD request on the main endpoint / for both theia and vscode |
The history of the decision is found in eclipse-che/che-machine-exec#105 and devfile/devworkspace-operator#78. In a general sense, checking Ironically, doing a HEAD request on
In fact, the reason this bug happened is because excluding |
well the gateway component is intercepting the calls so it could intercept handle the /healthz and check if the underlying service is returning 200 or not Why put a gateway in every container if it doesn't bring value It looks like strange to patch theia and vscode server to add a /healthz entrypoint |
Describe the bug
If starting a new Workspace opening the IDE e.g. che-code is triggered to fast and responds with a
Bad Gateway
. If clicked refresh in the browser after 2 seconds everything loads as expected. Maybe che-code or the traeffik configration is not yet ready?So basically the redirect from here
to the IDE happens to fast.
Startup times of workspaces are incredibly fast after we switched to devworkspaces. Great improvement! :)
Che version
next (development version)
Steps to reproduce
Start che-code environment.
Expected behavior
Che code should be opened as soon as its ready.
Runtime
Kubernetes (vanilla)
Screenshots
No response
Installation method
chectl/latest
Environment
Linux
Eclipse Che Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: