Eclipse Che Installation in AWS EC2, failure to start a workspace
Description
Trying to run che-server:7.0.0-RC-2.0. che-server installs and runs fine, able to view dashboard and stacks/devfiles.
But, when i try to create a workspace, it fails. The logs are given below.
Some of the experts in a forum feel that the che master pod is unable to communicate with the theia pod.
In local PC everyting works fine and able to create workspaces. But, in AWS EC2, dashboard comes up, but creating workspace fails.
Reproduction Steps
minikube start --cpus 2 --memory 4096 --extra-config=apiserver.authorization-mode=RBAC --vm-driver=none
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
kubectl create serviceaccount tiller --namespace kube-system
kubectl apply -f ./tiller-rbac.yaml
helm init --service-account tiller --wait
minikube addons enable ingress
helm dependencies update --skip-refresh ./
minikube ip
export CHE_DOMAIN=$(minikube ip)
helm upgrade --install che --force --namespace che --set global.ingressDomain=${CHE_DOMAIN}.nip.io --set cheImage=eclipse/che-server:7.0.0-RC-2.0 ./
OS and version: Ubuntu 18.04 AWS EC2 instance
Diagnostics: Here is the log:
2019-07-02 13:34:48,148[nio-8080-exec-5] [INFO ] [o.e.c.a.w.s.WorkspaceRuntimes 433] - Starting workspace 'che/wksp-0m6t' with id 'workspaceh47e7hjup6tqzgqd' by user 'che'
2019-07-02 13:35:22,846[nio-8080-exec-2] [WARN ] [a.c.w.i.BasicWebSocketEndpoint 145] - Web socket session error
2019-07-02 13:35:22,847[nio-8080-exec-2] [WARN ] [a.c.w.i.BasicWebSocketEndpoint 129] - Closing unidentified session`
2019-07-02 13:39:18,077[aceSharedPool-1] [WARN ] [.i.k.KubernetesInternalRuntime 245] - Failed to start Kubernetes runtime of workspace workspaceh47e7hjup6tqzgqd. Cause: Server 'theia' in machine 'theia-ide3dy' not available.
2019-07-02 13:39:18,834[aceSharedPool-1] [INFO ] [o.e.c.a.w.s.WorkspaceRuntimes 856] - Workspace 'che:wksp-0m6t' with id 'workspaceh47e7hjup6tqzgqd' start failed
@svkr2k how are you creating and starting the workspace?
I think it's a duplicate of https://github.com/eclipse/che/issues/13435
@benoitf Looks likey, yes. The logs here and on the other bug look uninteresting. What additional info could we request that would help us pin down the issue?
Tentatively marking this as 7.0.0, not starting is not good.
I suspect that minikube ip doesn't provide the good IP address in the case of EC2. I mean it provides the internal IP but not the public one. See EC2 user guide for more details.
@skabashnyuk @sleshchenko do you think that this may be the problem? Do you have other ideas about why wsmaster and theia cannot communicate?
@svkr2k how are you creating and starting the workspace?
@tsmaeder , thank you for your question. I was able to open http://che-che.ip-address.nip.io and see the che dashboard. In the dashboard, i selected a stack from the list and clicked on Create workspace button to create the workspace.
Hope this helps. Thank you for looking into this. I would really be happy if i get a solution for the issue. I see the same issue described above using the version 7.0.0-rc-3.0 too. (Also, kindly add this to 7.0.0 milestone)
@svkr2k just to clarify your environment. Are you running Che locally with minikube or on AWS?
I experience this issue if running in multi-user mode, interestingly if I deploy Che in single-user mode Theia loads successfully, however it is then not able to create terminals. I am also using Che in AWS.
@andy316x with which browser for terminals ? There is an issue with firefox
@benoitf I am using Chrome so not sure if that is the problem
@skabashnyuk ,
@svkr2k just to clarify your environment. Are you running Che locally with minikube or on AWS?
I'm, running che on AWS (ubuntu 16.04) in single-user mode and created workspace using any of the already available stack/devfile from the dashboard.
(Kindly note that when i run che in locally in ubuntu or windows PC, it works fine.)
@svkr2k I have no AWS EC2 environment available to test. Can you try to install che with https://github.com/che-incubator/chectl ?
@svkr2k just to clarify your environment. Are you running Che locally with minikube or on AWS?
Hi @skabashnyuk , to clarify further: I'm running Che on AWS "with minikube".
Hi all, I have a question regarding the above issue: While creating a workspace from dashboard, will the che-host try to communicate with workspace container using .nip.io url?
@svkr2k can you try the way to install che how @l0rd suggested here? https://github.com/eclipse/che/issues/13838#issuecomment-511723339
@skabashnyuk , sure, i shall try that : https://github.com/eclipse/che/issues/13838#issuecomment-511723339
Also, please note that in AWS EC2 instance, i start minikube using the following:
sudo minikube start --memory=4096 --vm-driver=none
@svkr2k can you try the way to install che how @l0rd suggested here? #13838 (comment)
Thank you very much for providing inputs.
- Tried to run che using the following commands:
sudo minikube start --memory=4096 --vm-driver=none
sudo kubectl create secret generic che-tls [email protected]
sudo chectl server:start --installer=helm --multiuser --platform=k8s --tls --self-signed-cert --domain=10.9.2.247.nip.io --cheimage=eclipse/che-server:7.0.0-rc-3.0
- Here is the error i got:
~$ sudo chectl server:start --installer=helm --multiuser --platform=k8s --tls --self-signed-cert --domain=10.9.2.247.nip.io --cheimage=eclipse/che-server:7.0.0-rc-3.0
sudo: unable to resolve host ip-10-9-2-247
✔ ✈️ Kubernetes preflight checklist
✔ Verify if kubectl is installed
✔ Verify remote kubernetes status...done.
✔ Verify domain is set...set to 10.9.2.247.nip.io.
❯ 🏃 Running Helm to install Che
✔ Verify if helm is installed
✔ Check for TLS prerequisites che-tls secret exist.
✔ Create Tiller Role Binding...it already exist.
✔ Create Tiller Service Account...it already exist.
✔ Create Tiller RBAC
✔ Create Tiller Service...it already exist.
✔ Preparing Che Helm Chart...done.
✔ Updating Helm Chart dependencies...done.
✖ Deploying Che Helm Chart
→ Unable to execute helm command helm upgrade --install che --force --namespace che --set global.ingressDomain=10.9.2.247.nip.io --set global.cheDomain=10.9.2.247.nip.io --set cheImage=eclipse/che-server:7.0.0-rc-3.0 --set global.c
…
Error: Unable to execute helm command helm upgrade --install che --force --namespace che --set global.ingressDomain=10.9.2.247.nip.io --set global.cheDomain=10.9.2.247.nip.io --set cheImage=eclipse/che-server:7.0.0-rc-3.0 --set global.cheWorkspacesNamespace=che -f /home/ubuntu/.cache/chectl/templates/kubernetes/helm/che/values/multi-user.yaml -f /home/ubuntu/.cache/chectl/templates/kubernetes/helm/che/values/tls.yaml /home/ubuntu/.cache/chectl/templates/kubernetes/helm/che/ / Error: validation failed: [unable to recognize "": no matches for kind "Certificate" in version "certmanager.k8s.io/v1alpha1", unable to recognize "": no matches for kind "ClusterIssuer" in version "certmanager.k8s.io/v1alpha1"]
at HelmHelper.
- Additional information:
sudo helm versionClient: &version.Version{SemVer:"v2.14.1", GitCommit:"5270352a09c7e8b6e8c9593002a73535276507c0", GitTreeState:"clean"}Server: &version.Version{SemVer:"v2.14.1", GitCommit:"5270352a09c7e8b6e8c9593002a73535276507c0", GitTreeState:"clean"}
$ kubectl create namespace cert-manager
$ kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true
$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v0.8.1/cert-manager.yaml --validate=false
Greetings, @benoitf , @skabashnyuk . Thank you very much !
Here are the steps i followed:
$ sudo minikube start --memory=4096 --vm-driver=none
$ sudo kubectl create secret generic che-tls [email protected]
$ kubectl create namespace cert-manager
$ kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true
$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v0.8.1/cert-manager.yaml --validate=false
$ sudo chectl server:start --installer=helm --multiuser --platform=k8s --tls --self-signed-cert --domain=10.9.2.247.nip.io --cheimage=eclipse/che-server:7.0.0-rc-3.0
Here are the other errors that i got:
~$ sudo chectl server:start --installer=helm --multiuser --platform=k8s --tls --self-signed-cert --domain=10.9.2.247.nip.io --cheimage=eclipse/che-server:7.0.0-rc-3.0
sudo: unable to resolve host ip-10-9-2-247
✔ ✈️ Kubernetes preflight checklist
✔ Verify if kubectl is installed
✔ Verify remote kubernetes status...done.
✔ Verify domain is set...set to 10.9.2.247.nip.io.
✔ 🏃 Running Helm to install Che
✔ Verify if helm is installed
✔ Check for TLS prerequisites che-tls secret exist.
✔ Create Tiller Role Binding...it already exist.
✔ Create Tiller Service Account...it already exist.
✔ Create Tiller RBAC
✔ Create Tiller Service...it already exist.
✔ Preparing Che Helm Chart...done.
✔ Updating Helm Chart dependencies...done.
✔ Deploying Che Helm Chart...done.
❯ ✅ Post installation checklist
❯ PostgreSQL pod bootstrap
✖ scheduling
→ ERR_TIMEOUT: Timeout set to pod wait timeout 300000. podExist: false, currentPhase: undefined
downloading images
starting
Keycloak pod bootstrap
Che pod bootstrap
Retrieving Che Server URL
Che status check
Error: ERR_TIMEOUT: Timeout set to pod wait timeout 300000. podExist: false, currentPhase: undefined
at KubeHelper.<anonymous> (/snapshot/chectl/lib/api/kube.js:0:0)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/chectl/node_modules/tslib/tslib.js:107:62)
~$ sudo kubectl get pod --namespace che
sudo: unable to resolve host ip-10-9-2-247
NAME READY STATUS RESTARTS AGE
che-67777bbb5b-r6r4h 0/1 Running 21 102m
keycloak-5cf455c44d-lx4hl 1/1 Running 0 102m
postgres-6c4d6c764c-5vqw2 1/1 Running 0 102m
~$ sudo kubectl get events --namespace che -o custom-columns=TIMESTAMP:lastTimestamp,TYPE:type,MESSAGE:message -w
sudo: unable to resolve host ip-10-9-2-247
TIMESTAMP TYPE MESSAGE
2019-07-17T04:58:26Z Normal Pulling image "eclipse/che-server:7.0.0-rc-3.0"
2019-07-17T05:13:56Z Warning Readiness probe failed: HTTP probe failed with statuscode: 500
2019-07-17T04:38:25Z Warning Liveness probe failed: HTTP probe failed with statuscode: 500
2019-07-17T05:08:31Z Warning Back-off restarting failed container
Hi @benoitf , @skabashnyuk .
I believe that the urls used for communicating with the containers could be based on .nip.io.
As an alternative, could you kindly send me a link to the documentation or steps to setup che to use domain name based urls instead of