Launching Che with docker as explained in documentation doesn't work
- I have a vm in amazon with Ubuntu 14.04, with port 8080 opened.
- Runing as explained in doc, starts container:
docker run --privileged --name che -it -p 8080:8080 -p 32768-32788:32768-32788 codenvy/che
- I can access throught IP:8080, and see che running
- I go to Projects
- Press "New Project", then PHP and CREATE PROJECT
- Che creates workspace (1) ok, and start workspace master (2) ok,
- in step (3) it hangs, on:
[...]
[STDOUT] 2016-02-10 07:19:48,418[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 916] - Deploying web application archive /home/user/che/ws-agent/webapps/ide.war
[STDOUT] Wed Feb 10 07:20:36 UTC 2016 - [localhost-startStop-1] Product-specified preferences called before plugin is started
[ERROR] Workspace agent is not responding. Workspace workspacek5as9cb01gqb8q6a will be stopped
With following message:
Error when starting workspace Unable to start workspace. Error when trying to start the workspace: Workspace agent is not responding. Workspace workspacek5as9cb01gqb8q6a will be stopped
If you run it on Amazon you have to add -e "DOCKER_MACHINE_HOST=yourVMIP" and an env variable.
By the way, we will rework the docker approach to get rid of Docker in Docker and update docs.
I'll try with that. I'll post if it works. What you mean? You will not have docker for che anymore?
We will get rid of Docker in Docker. So, Che server will be launched in a Docker container, and the workspace container will be launched on the host, beside Che server container.
Hi!
Thank you for your answers.
I've removed all containers and image, to start from zero again.
Run using:
docker run --privileged --name che -it -p 8080:8080 -p 32768-32788:32768-32788 -e "DOCKER_MACHINE_HOST=EC2PublicIP" codenvy/che
LOG:
[STDOUT] 2016-02-10 16:46:35,017[main] [INFO ] [o.a.c.core.StandardEngine 259] - Starting Servlet Engine: Apache Tomcat/8.0.28
[STDOUT] 2016-02-10 16:46:35,423[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 916] - Deploying web application archive /home/user/che/ws-agent/webapps/ide.war
[STDOUT] Wed Feb 10 16:47:20 UTC 2016 - [localhost-startStop-1] Product-specified preferences called before plugin is started
[STDOUT] 2016-02-10 16:47:22,494[rrest.WSClient1] [INFO ] [.c.a.c.n.WSocketEventBusClient 223] - Open connection to ws://che-host:8080/ide/api/eventbus/?token=dummy_token.
[ERROR] Workspace agent is not responding. Workspace workspaceery6thbu5l511bif will be stopped
Showing this error in a window:
Error when starting workspace
Unable to start workspace. Error when trying to start the workspace: Workspace agent is not responding. Workspace workspaceery6thbu5l511bif will be stopped
I've tried also opening the ports 32768-32788 to the public (should I do that?), but it didin't worked, same error :( Is there another way to install and make it work on a EC2 vm?
Hi: Sorry that you are running into this issue. If you have a sense of adventure, let's get you upgraded to the latest Che and the script that does not use Docker-in-Docker. Please, make sure that you install RC3, which was released yesterday.
Next, can you grab this pull request: https://github.com/codenvy/che/pull/257
That pull request is just a single file located in /assembly-main/src/assembly/bin/che.sh. If you grab that file and replace your /bin/che.sh with it, this will give you a set of commands for running Docker without DIND, and that changes the port configuration to be much simpler --- it also has a side effect of being much faster and stabler.
Can you give this a try?
Yes I have sense of adventure... With your help I know I will succeed. But I'm new in docker and even more in che, I will cope with it but I'll need clear instructions. I'll follow your instructions...
By the way, one extra doubt, will I be able to develop my python app with che? Because I'm planning to use Che to develop Odoo. I will be more than glad if that will be possible, Che seems to be fantastic...
We are happy to help. Since you are running on Ubuntu, why are you attempting to start Che in a docker container? That adds an extra layer of abstraction, which is great for environments that want to deploy many che instances. But if you are just running on Ubuntu, you can run "che --remote:
Python will be possible. You will need to provide a stack file, which is a dockerfile that has the python stack in it, and there is some work to do on that, but it's not hard.
Give it a try with --net=host and do not use -p
And yes, you have to open a range of ports 32768-65535. 100 ports is enough though.
And this issue does not seem to have anything to do with docker in docker. I am 99% sure this is a blocked ports issue. Either the right ports are not mapped to host ports or Amazon blocks smth.
To check it, exec into a che container after you've started a workspace and run docker ps. You will see your ws container with all the port mappings. Now, if the ports used are different from the range in -p command line, this is the issue. --net=host should fix the issue, just make sure port 8080 is free on your instance. There may be port conflicts with shutdown port and JMX ports in case they are not vacant on the host. Alternatively, you may increase -p range, say 32768-32878
I was able to run che and create the sample PHP project. I did it natively, got RC3 binaries and then I changed machine.ws_agent.max_start_time_ms=120000 ;) Now I need to be able to develop in python (develop and debug), where can I get help to setup that?
Yes, machine.ws_agent.max_start_time_ms=120000 was a key with Docker as well. Since your EC2 instance was weak, it took a while for the workspace agent to start while Che server gives it just one minutes to boot.
As to Python, right now Che can offer syntax coloring and any custom Python environment to run your scripts. Che has a debugger for Java web apps, with UI and all the perks of a build in debugger. For Python, will https://docs.python.org/2/library/pdb.html work for you?
We'll be adding more default environments and tutorials on getting started with technologies in the coming weeks.
Closing this issue as the original problem was solved.