question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

workspace never comes up when Che deployed with single-host strategy

See original GitHub issue

Describe the bug

Che workspace never comes up when Che deployed with single-host strategy

Che version

  • latest

Expected behavior

Runtime

  • minikube (include output of minikube version and kubectl version)

Screenshots

Screenshot from 2020-07-14 12-50-17

Installation method

Actually chectl doesn’t support changing server strategy. That’s why I modified sources https://github.com/che-incubator/chectl/blob/master/src/tasks/installers/helm.ts#L349 by adding setOptions.push('--set global.serverStrategy=single-host')

  • chectl ./run server:start --platform=minikube --installer=operator --che-operator-cr-patch-yaml <patch_yaml>
spec:
  k8s:
    ingressStrategy: single-host

Environment

  • my computer
    • Linux

jwt-proxy container log

time="2020-07-14T09:46:00Z" level=info msg="Starting reverse proxy (Listening on ':4402')" 
time="2020-07-14T09:46:00Z" level=info msg="Starting reverse proxy (Listening on ':4400')" 
time="2020-07-14T09:46:00Z" level=info msg="Starting reverse proxy (Listening on ':4401')" 
2020/07/14 09:48:30 [008] WARN: Error reading handhsake response  unexpected EOF
2020/07/14 09:48:30 [008] WARN: Websocket handshake error: unexpected EOF
2020/07/14 09:48:30 http: response.WriteHeader on hijacked connection from github.com/eclipse/che-jwtproxy/vendor/github.com/coreos/goproxy.(*ProxyHttpServer).ServeHTTP (proxy.go:149)
2020/07/14 09:48:30 http: response.Write on hijacked connection from io.copyBuffer (io.go:404)

Additional context

https://github.com/eclipse/che/issues/14564

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
sparkoocommented, Jul 22, 2020

I think I found and fixed the issue. https://github.com/eclipse/che-theia/blob/master/extensions/eclipse-che-theia-messaging/src/node/messaging/che-messaging-contribution.ts#L81

The objects here looks like this:

2020-07-22 12:40:22.990 root INFO theiaEndpoints: [{"codeUri":{"$mid":1,"path":"/server0lrge5i9-theia-idexh4/server-3130/","scheme":"https","authority":"che.192.168.39.154.nip.io"}},{"codeUri":{"$mid":1,"path":"/serverz6bqowu3-jwtproxy/server-4402/","scheme":"https","authority":"che.192.168.39.154.nip.io"}}] 
2020-07-22 12:40:22.990 root INFO requestOriginURI: {"codeUri":{"$mid":1,"path":"/","scheme":"https","authority":"che.192.168.39.154.nip.io"}}

isEqualOrParent function looks like this (https://github.com/eclipse-theia/theia/blob/14531578a1eac6af55c6177ea857d39c38c9f09b/packages/core/src/common/uri.ts#L202):

isEqualOrParent(uri: URI): boolean {
  return this.authority === uri.authority && this.scheme === uri.scheme && this.path.isEqualOrParent(uri.path);
}

issue is in this.path.isEqualOrParent(uri.path) where we are comparing them in reverse. Swapping them fixes the issue.

0reactions
sparkoocommented, Jul 22, 2020

PR merged https://github.com/eclipse/che-theia/pull/812, closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Configuring CodeReady Workspaces
Specifies whether CodeReady Workspaces is deployed with DevWorkspaces enabled. ... They can either follow the single-host strategy and be exposed on ...
Read more >
Unable to bring up Eclipse che on Kubernetes - Stack Overflow
I got Kubernetes installed on Ubuntu and am trying to run chectl server:start but it is failing. What am doing wrong? Below is...
Read more >
Introduction to Eclipse Che :: Eclipse Che Documentation
A multi-container workspace for each developer with the ability to replicate with a single click using Eclipse Che factories. Pre-built stacks with the...
Read more >
Devfile v2 and IDE plug-ins - Eclipse Che Blog
ℹ️ When DevWorkspace is enabled, single-host deployment is enforced. As a consequence, when the Che host certificate is untrusted, ...
Read more >
Get Started with VMware Cloud Disaster Recovery
Set up and scale your Disaster Recovery environment on demand by choosing the deployment option that best fits your recovery and resiliency needs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found