-
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
The net problem when deploy che server and che workspace in differenet VM. #2118
Comments
I could run 4.5.1 like: but when comes to 4.6.2,I gote these error: Any changes? Error: No such image or container: ceb7a86dd7dcERROR: !!! ERROR: !!! |
I have changed the image name from to codenvy/che to codenvy/che-server , it can run che server ok. docker run --name che -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST=tcp://10.21.27.106:4243 codenvy/che-server:4.6.2 -r:10.21.25.232 but have this problem: I think the reason is workspace container can not reach to che server |
Yes, I know the issue. We changed the meaning of codenvy/che. You want codenvy/che-server as the image name to use the same syntax as you used to use. codenvy/che is now for the Docker launcher. |
Ok - at least you are now running properly. The Che server attempts to reconnect to the workspace directlry. The docker daemon creates the ws and then che tries to contact it. Here is the algorithm for how Che pings the ws:
So from the container running the che server - can you figure out an internal IP address that is reachable? You can then set machine.docker.local_node_host into the che.properties and then the che server should attempt to ping the ws directly. |
Cool,it could work for both 4.5.1&4.6.2 if I set machine.docker.local_node_host. But according your algorithm , if I set CHE_DOCKER_MACHINE_HOST ,it would not work(v4.6.2). Is this a defect? By the way,is there any details to clarify why and how che server and che workspace communicate with each other. |
The algorithm for communications is documented here. Not sure I udnerstand your other question about the environment variables. |
I mean if I only set CHE_DOCKER_MACHINE_HOST while not modified machine.docker.local_node_host, it would not work And I want to known why che server need to communicate with che workspace two-way. Could che server only communicate with docker deamon? |
Che server has to communicate with workspace. Keep alives, determining internal state of the workspace, and so forth. We have no plans to support Che communicating to the workspace through the Docker container. But in theory it's possible. This would break certain portability goals that we have, however. As the docker layer is removable by our partners. @garagatyi - he would have to comment on the CHE_DOCKER_MACHINE_HOST variable with the server. That is a server environment variable. If that value is set, it should be picked up. |
Thanks~~I get it~ |
I have get a net problem when deploy che server and che workspace in differenet VM.
My enviroment:
Che Server VM eth0 : 10.21.25.232
Che Workspace VM eth0 : 10.21.27.16
Che version:4.5.1
Operating system:Centos 7.0.1
Reproduction Steps:
1.modified machine.docker.che_api.endpoint=http://10.21.25.232:8080/wmaster/api
2.run che server like:
docker run --name che -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST=tcp://10.21.27.106:4243 che -r:10.21.25.232
3.create project, the workspace has created, but got this error as its launched: “The workspace agent has attempted to start, but it is unable to ping the Che server at http://che-host:8080/wsmaster/api/”
It seems like the che workspace container can not ping to 10.21.25.232:8080, because it is NAT net mode in 10.21.27.16
Is there simple way to solve it?
The text was updated successfully, but these errors were encountered: