eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.96k stars 1.19k forks source link

In CHE FARM mode, Run the second che-server:5.2.2 instance destroyed the first instance or its dev-machine #4162

Closed durtsjohn closed 7 years ago

durtsjohn commented 7 years ago

I want to support multi-user in my system, so I select CHE FARM mode to run multiple che-server instance in my virtual machine. I was failed to implement it by the following to ways. My environment: Centos 7 run in Virtualbox, docker 1.12.5, eclipse che 5.2.2, host external ip: 10.0.0.4 User 1 data space: /work/space/9090 User 2 data space: /work/space/9100

First way, I directly use the image eclipse/che:5.2.2: _docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /work/space/9090:/data -v /work/che522/che/assembly/assembly-main/target:/assembly -e CHE_HOST=10.0.0.4 -e CHE_PORT=9090 -e CHECONTAINER=durts eclipse/che:5.2.2 start So, there is a new che-server container named 'durts' work correctly, I can browse it vas 10.0.0.4:9090. After that, I start the second instance, i want it work with different port 9100: _docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /work/space/9100:/data -v /work/che522/che/assembly/assembly-main/target:/assembly -e CHE_HOST=10.0.0.4 -e CHE_PORT=9100 -e CHECONTAINER=super eclipse/che:5.2.2 start Nothing wrong was found in the command INFO. The new che-server instance named 'super' running now, but the first running instance 'durts' is SHUTDOWN!!

Second way, I start the image eclipse/che-server:5.2.2 by docker-compose: In /work/space/9090/instance, run : docker-compose --file="docker-compose.yml" -p="durts" up -d --no-recreate In /work/space/9100/instance, run : docker-compose --file="docker-compose.yml" -p="super" up -d --no-recreate The two instance can running correctly, but if I open a workspace machine in che-server 1, then start che-server 2, the running dev-machine is DESTROYED !!

The contents of docker-compose.yml(same as docker-compose-container.yml) , instance/config/che.env, cli.log are in my reference files: 1-docker-compose.yml.txt 1-che.env.txt 1-cli.log.txt 2-docker-compose.yml.txt 2-che.env.txt 2-cli.log.txt

Finally, Here are my questions: **1. How can I run multiple che-server instances in my virtual machine ?

  1. How can I analysis the problems ? like debug info or detail logs, cli.log is too simple.**

Thanks a lot. Durts John 2017-02-16

ghost commented 7 years ago

@durtsjohn thanks for an interesting question. Unfortunately (or fortunately) I was unable to reproduce it:

docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v /root/che-data/9000:/data  -e CHE_CONTAINER=durts -e CHE_HOST=207.154.206.26 -e CHE_PORT=9000 eclipse/che-cli:nightly start --fast

root@ubuntu-4gb-fra1-01:~/che-data# docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v /root/che-data/9010:/data -e CHE_CONTAINER=super -e CHE_HOST=207.154.206.26 -e CHE_PORT=9010 eclipse/che-cli:nightly start --fast

image

The only difference is that I used nightly tag. Can you remove your local data storage dirs and give it a try with nightly?

TylerJewell commented 7 years ago

There was a bug fixed after 5.2.2 - so they will need 5.3 or the nightly. I can link a couple other people that tripped up into the same bug.

TylerJewell commented 7 years ago

This is the issue where it was discussed and linked to the PR that fixes it. https://github.com/eclipse/che/issues/4130

durtsjohn commented 7 years ago

I test this with nightly version, it works correctly. After that, i will try to find out a stable version.

durtsjohn commented 7 years ago

I will close this issue. Thank you very much!

TylerJewell commented 7 years ago

We should make the 5.3. release tomorrow. It should have been yesterday, but QA found some issues and doing another cycle. You will see the 5.3 release show up on DockerHub once it is done.

worksamp commented 6 years ago

Hi eivantsov, I have tried with your suggestion to run docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v /root/che-data/9000:/data -e CHE_CONTAINER=durts -e CHE_HOST=207.154.206.26 -e CHE_PORT=9000 eclipse/che-cli:nightly start --fast It is working locally perfectly, but i am not able to run workspaces from different machine. Because internally it is calling localhost in wsagent. please help me in this. Thanks in advance.

ghost commented 6 years ago

Because internally it is calling localhost in wsagent

Can you elaborate on it please?

worksamp commented 6 years ago

I am able to access workspaces with localhost:9000 but not able to access from different machine with macchine ip :9000. It is giving error when i am trying to run it

ghost commented 6 years ago

A screenshot or error message will help

worksamp commented 6 years ago

Hi eivantsov, these are the errors

Failed to load resource: the server responded with a status of 404 () app-7b5aad5492.js:13 Keycloak initialization failed with error: Object (anonymous) @ app-7b5aad5492.js:13 vendor-73784b1bca.js:75 You are using the ngTouch module. Angular Material already has mobile click, tap, and swipe support... ngTouch is not supported with Angular Material! (anonymous) @ vendor-73784b1bca.js:75 11vendor-73784b1bca.js:75 Markup '' may not work as expected in IE Browsers. Consult 'https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers' for details. (anonymous) @ vendor-73784b1bca.js:75 vendor-73784b1bca.js:75 Preloading IDE javascript /_app/BBE846F6613FDB34E5866B5FE44E0096.cache.js api.github.com/user Failed to load resource: the server responded with a status of 401 (Unauthorized) :9000/api/organization?skipCount=0&user=che Failed to load resource: the server responded with a status of 404 () vendor-73784b1bca.js:75 Cannot fetch namespaces: undefined (anonymous) @ vendor-73784b1bca.js:75 api.github.com/user Failed to load resource: the server responded with a status of 401 (Unauthorized) vendor-73784b1bca.js:33381 Cannot fetch namespaces: undefined (anonymous) @ vendor-73784b1bca.js:33381 _app-0.js:17360 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. pFk @ _app-0.js:17360 _app-0.js Failed to load resource: the server responded with a status of 404 () pFk @ _app-0.js:17360 _app-0.js:15810 WebSocket connection to 'ws://localhost:32772/pty?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED RSj @ _app-0.js:15810 _app-0.js:17193 WebSocket connection to 'ws://localhost:32771/connect?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32771/connect?token= tzk @ _app-0.js:17120 _app-0.js:17193 WebSocket connection to 'ws://localhost:32771/connect?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32771/connect?token= tzk @ _app-0.js:17120 _app-0.js:15810 WebSocket connection to 'ws://localhost:32772/pty?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED RSj @ _app-0.js:15810 _app-0.js:17193 WebSocket connection to 'ws://localhost:32771/connect?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32771/connect?token= tzk @ _app-0.js:17120 _app-0.js:17193 WebSocket connection to 'ws://localhost:32771/connect?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32771/connect?token= tzk @ _app-0.js:17120 _app-0.js:17193 WebSocket connection to 'ws://localhost:32771/connect?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32771/connect?token= tzk @ _app-0.js:17120 _app-0.js:17193 WebSocket connection to 'ws://localhost:32771/connect?token=' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32771/connect?token= tzk @ _app-0.js:17120 _app-0.js:17193 WebSocket connection to 'ws://localhost:32774/wsagent?token=&clientId=1075318894' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 JAk @ _app-0.js:17176 TAk @ _app-0.js:17186 LTi @ _app-0.js:13601 RTi @ _app-0.js:13607 fUi @ _app-0.js:13617 F8d @ _app-0.js:3628 PTi @ _app-0.js:13605 OTi @ _app-0.js:13604 _Ti @ _app-0.js:13614 Kjg @ _app-0.js:7697 cB @ _app-0.js:926 YDk @ _app-0.js:17306 bEk @ _app-0.js:17310 (anonymous) @ _app-0.js:4992 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32774/wsagent?token=&clientId=1075318894 tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 Azk @ _app-0.js:17127 hAk @ _app-0.js:17155 onerror @ _app-0.js:17193 _app-0.js:947 GET http://localhost:32774/api/project-type net::ERR_CONNECTION_REFUSED IB @ _app-0.js:947 JB @ _app-0.js:948 JNj @ _app-0.js:15629 INj @ _app-0.js:15628 MNj @ _app-0.js:15631 UNj @ _app-0.js:15634 aUe @ _app-0.js:4984 (anonymous) @ _app-0.js:4987 $Te @ _app-0.js:4982 NNj @ _app-0.js:15631 $zj @ _app-0.js:15136 fAj @ _app-0.js:15142 Kjg @ _app-0.js:7697 cB @ _app-0.js:926 YDk @ _app-0.js:17306 bEk @ _app-0.js:17310 (anonymous) @ _app-0.js:4992 Promise resolved (async) lUe @ _app-0.js:4992 XDk @ _app-0.js:17305 _Dk @ _app-0.js:17309 Age @ _app-0.js:3865 Yfe @ _app-0.js:3845 Sfe @ _app-0.js:3840 qfe @ _app-0.js:3817 PSi @ _app-0.js:13559 rfe @ _app-0.js:3818 RAk @ _app-0.js:17184 iAk @ _app-0.js:17155 onmessage @ _app-0.js:17193 _app-0.js:17120 ERROR (org.eclipse.che.ide.projecttype.ProjectTypeRegistryImpl): Can't load project types: org.eclipse.che.ide.commons.exception.ServerDisconnectedException tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 yzk @ _app-0.js:17125 lAj @ _app-0.js:15145 qUe @ _app-0.js:4997 (anonymous) @ _app-0.js:4989 Promise rejected (async) iUe @ _app-0.js:4989 $zj @ _app-0.js:15136 fAj @ _app-0.js:15142 Kjg @ _app-0.js:7697 cB @ _app-0.js:926 YDk @ _app-0.js:17306 bEk @ _app-0.js:17310 (anonymous) @ _app-0.js:4992 Promise resolved (async) lUe @ _app-0.js:4992 XDk @ _app-0.js:17305 _Dk @ _app-0.js:17309 Age @ _app-0.js:3865 Yfe @ _app-0.js:3845 Sfe @ _app-0.js:3840 qfe @ _app-0.js:3817 PSi @ _app-0.js:13559 rfe @ _app-0.js:3818 RAk @ _app-0.js:17184 iAk @ _app-0.js:17155 onmessage @ _app-0.js:17193 _app-0.js:947 GET http://localhost:32774/api/languageserver/supported net::ERR_CONNECTION_REFUSED IB @ _app-0.js:947 JB @ _app-0.js:948 JNj @ _app-0.js:15629 INj @ _app-0.js:15628 MNj @ _app-0.js:15631 UNj @ _app-0.js:15634 aUe @ _app-0.js:4984 (anonymous) @ _app-0.js:4987 $Te @ _app-0.js:4982 NNj @ _app-0.js:15631 Pll @ _app-0.js:18842 _6k @ _app-0.js:18360 c7k @ _app-0.js:18363 Kjg @ _app-0.js:7697 cB @ _app-0.js:926 YDk @ _app-0.js:17306 bEk @ _app-0.js:17310 (anonymous) @ _app-0.js:4992 Promise resolved (async) lUe @ _app-0.js:4992 XDk @ _app-0.js:17305 _Dk @ _app-0.js:17309 Age @ _app-0.js:3865 Yfe @ _app-0.js:3845 Sfe @ _app-0.js:3840 qfe @ _app-0.js:3817 PSi @ _app-0.js:13559 rfe @ _app-0.js:3818 RAk @ _app-0.js:17184 iAk @ _app-0.js:17155 onmessage @ _app-0.js:17193 _app-0.js:17120 ERROR (org.eclipse.che.plugin.languageserver.ide.LanguageServerFileTypeRegister): org.eclipse.che.ide.commons.exception.ServerDisconnectedException: undefined at Unknown.ap(Throwable.java:60) at Unknown.KRg(ServerDisconnectedException.java:21) at Unknown.nfi(AsyncRequestCallback.java:203) at Unknown.ufi(AsyncRequestCallback.java:94) at Unknown.yB(Request.java:250) at Unknown.RB(RequestBuilder.java:412) at Unknown.anonymous(XMLHttpRequest.java:329) at Unknown.Yp(Impl.java:309) at Unknown._p(Impl.java:361) at Unknown.anonymous(Impl.java:78) at Unknown.$B(StringValidator.java:66) at Unknown.ZB(StringValidator.java:49) at Unknown.LB(RequestBuilder.java:292) at Unknown.kGk(AsyncRequest.java:72) at Unknown.oGk(MachineAsyncRequestFactory.java:129) at Unknown.anonymous(JsPromise.java:116) at Unknown.TA(EventBus.java:69) at Unknown.Thk(SimpleEventBus.java:57) at Unknown.Uhk(NodeLoader.java:306) at Unknown.Whk(NodeLoader.java:374) at Unknown.pik(NodeLoader.java:366) at Unknown.anonymous(JsPromise.java:116) at Unknown.TA(EventBus.java:69) at Unknown.Thk(SimpleEventBus.java:57) at Unknown.Uhk(NodeLoader.java:306) at Unknown.Whk(NodeLoader.java:374) at Unknown.pik(NodeLoader.java:366) at Unknown.anonymous(JsPromise.java:116) at Unknown.TA(EventBus.java:69) at Unknown.Thk(SimpleEventBus.java:57) at Unknown.Uhk(NodeLoader.java:306) at Unknown.Whk(NodeLoader.java:374) at Unknown.pik(NodeLoader.java:366) at Unknown.anonymous(JsPromise.java:116) at Unknown.TA(EventBus.java:69) at Unknown.Thk(SimpleEventBus.java:57) at Unknown.Uhk(NodeLoader.java:306) at Unknown.Whk(NodeLoader.java:374) at Unknown.pik(NodeLoader.java:366) at Unknown.anonymous(JsPromise.java:116) at Unknown.TA(EventBus.java:69) at Unknown.Thk(SimpleEventBus.java:57) at Unknown.Uhk(NodeLoader.java:306) at Unknown.Whk(NodeLoader.java:374) at Unknown.pik(NodeLoader.java:366) at Unknown.anonymous(JsPromise.java:116) at Unknown.TA(EventBus.java:69) at Unknown.Thk(SimpleEventBus.java:57) at Unknown.Uhk(NodeLoader.java:306) at Unknown.Whk(NodeLoader.java:374) at Unknown.pik(NodeLoader.java:366) at Unknown.anonymous(JsPromise.java:116) tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 yzk @ _app-0.js:17125 m7k @ _app-0.js:18369 qUe @ _app-0.js:4997 (anonymous) @ _app-0.js:4989 Promise rejected (async) iUe @ _app-0.js:4989 _6k @ _app-0.js:18360 c7k @ _app-0.js:18363 Kjg @ _app-0.js:7697 cB @ _app-0.js:926 YDk @ _app-0.js:17306 bEk @ _app-0.js:17310 (anonymous) @ _app-0.js:4992 Promise resolved (async) lUe @ _app-0.js:4992 XDk @ _app-0.js:17305 _Dk @ _app-0.js:17309 Age @ _app-0.js:3865 Yfe @ _app-0.js:3845 Sfe @ _app-0.js:3840 qfe @ _app-0.js:3817 PSi @ _app-0.js:13559 rfe @ _app-0.js:3818 RAk @ _app-0.js:17184 iAk @ _app-0.js:17155 onmessage @ _app-0.js:17193 _app-0.js:947 GET http://localhost:32774/api/java/compiler-settings/all net::ERR_CONNECTION_REFUSED IB @ _app-0.js:947 JB @ _app-0.js:948 JNj @ _app-0.js:15629 INj @ _app-0.js:15628 MNj @ _app-0.js:15631 UNj @ _app-0.js:15634 aUe @ _app-0.js:4984 (anonymous) @ _app-0.js:4987 $Te @ _app-0.js:4982 NNj @ _app-0.js:15631 xFi @ _app-0.js:13098 CEi @ _app-0.js:13065 SEi @ _app-0.js:13074 qjg @ _app-0.js:7689 cB @ _app-0.js:926 dEk @ _app-0.js:17311 iEk @ _app-0.js:17315 (anonymous) @ _app-0.js:4992 Promise resolved (async) lUe @ _app-0.js:4992 cEk @ _app-0.js:17310 gEk @ _app-0.js:17314 Age @ _app-0.js:3865 Yfe @ _app-0.js:3845 Sfe @ _app-0.js:3840 qfe @ _app-0.js:3817 PSi @ _app-0.js:13559 rfe @ _app-0.js:3818 RAk @ _app-0.js:17184 iAk @ _app-0.js:17155 onmessage @ _app-0.js:17193 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32774/wsagent?token=&clientId=1075318894 tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 Azk @ _app-0.js:17127 hAk @ _app-0.js:17155 onerror @ _app-0.js:17193 _app-0.js:17193 WebSocket connection to 'ws://localhost:32774/wsagent?token=&clientId=1075318894' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 sAk @ _app-0.js:17161 ok @ _app-0.js:388 Tdm @ _app-0.js:385 Yp @ _app-0.js:541 _p @ _app-0.js:544 (anonymous) @ _app-0.js:543 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32774/wsagent?token=&clientId=1075318894 tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 Azk @ _app-0.js:17127 hAk @ _app-0.js:17155 onerror @ _app-0.js:17193 _app-0.js:17193 WebSocket connection to 'ws://localhost:32774/wsagent?token=&clientId=1075318894' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 sAk @ _app-0.js:17161 ok @ _app-0.js:388 Tdm @ _app-0.js:385 Yp @ _app-0.js:541 _p @ _app-0.js:544 (anonymous) @ _app-0.js:543 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32774/wsagent?token=&clientId=1075318894 tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 Azk @ _app-0.js:17127 hAk @ _app-0.js:17155 onerror @ _app-0.js:17193 _app-0.js:17193 WebSocket connection to 'ws://localhost:32774/wsagent?token=&clientId=1075318894' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 sAk @ _app-0.js:17161 ok @ _app-0.js:388 Tdm @ _app-0.js:385 Yp @ _app-0.js:541 _p @ _app-0.js:544 (anonymous) @ _app-0.js:543 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32774/wsagent?token=&clientId=1075318894 tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 Azk @ _app-0.js:17127 hAk @ _app-0.js:17155 onerror @ _app-0.js:17193 2_app-0.js:17193 WebSocket connection to 'ws://localhost:32774/wsagent?token=&clientId=1075318894' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED $Ak @ _app-0.js:17193 sAk @ _app-0.js:17161 ok @ _app-0.js:388 Tdm @ _app-0.js:385 Yp @ _app-0.js:541 _p @ _app-0.js:544 (anonymous) @ _app-0.js:543 _app-0.js:17120 WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32774/wsagent?token=&clientId=1075318894 tzk @ _app-0.js:17120 vzk @ _app-0.js:17122 uzk @ _app-0.js:17121 Azk @ _app-0.js:17127 hAk @ _app-0.js:17155 onerror @ _app-0.js:17193

ghost commented 6 years ago

@durtsjohn try -e CHE_DOCKER_IP_EXTERNAL=${PUBLIC_IP}

What's your OS?

sainirijul commented 6 years ago

Hi, I am trying to set up a workspace supporting multiple concurrent users. For this, i am using Multiple user assembly of Eclipse che and followed this thread.

On running the below command in windows powershell: docker run -it -e CHE_MULTIUSER=true -e CHE_HOST= -e CHE_KEYCLOAK_AUTH_SERVER_URL=http:///auth -v /var/run/docker.sock:/var/run/docker.sock -v /c/tmp:/data eclipse/che start

I am getting the below message: WARN: Bound 'eclipse/che' to 'eclipse/che:5.22.1' /scripts/base/startup_02_pre_docker.sh: line 14: /data/cli.log: Resource busy INFO: (che cli): 5.22.1 - using docker 17.12.0-ce / docker4windows WARN: Newer version '6.0.0-M4' available INFO: (che start): Booted and reachable INFO: (che start): Ver: 5.22.1 INFO: (che start): Use: http://localhost:8080 INFO: (che start): API: http://localhost:8080/swagger

Now can you please guide me further steps and other steps if i am missing to set up the workspace which multiple users can access concurrently from different machines ? I could not find simple straight forward documents/references for this. Your help would be highly appreciated.

Looking forward to your response