eclipse-che / che

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

Unable to create project eventhough workspace created. #2173

Closed rajasekaran07 closed 8 years ago

rajasekaran07 commented 8 years ago

[Short description of problem here]

I have followed the below URL to configure che server. My server is running but I can not create new project. che che1

https://www.eclipse.org/che/getting-started/download/

I got the below error while starting workspace agent. "[STDOUT] 2016-08-20 04:42:10,564[nio-4401-exec-6] [WARN ] [o.e.c.impl.ContainerResponse 93] - Client has aborted connection. Response writing omitted."

Che-Server logs:

root@ipaclient:~# docker logs -f che-server 2016-08-20 04:40:13,022[main] [INFO ] [o.a.c.s.VersionLoggerListener 89] - Server version: Apache Tomcat/8.0.32 2016-08-20 04:40:13,030[main] [INFO ] [o.a.c.s.VersionLoggerListener 91] - Server built: Feb 2 2016 19:34:53 UTC 2016-08-20 04:40:13,030[main] [INFO ] [o.a.c.s.VersionLoggerListener 93] - Server number: 8.0.32.0 2016-08-20 04:40:13,031[main] [INFO ] [o.a.c.s.VersionLoggerListener 95] - OS Name: Linux 2016-08-20 04:40:13,035[main] [INFO ] [o.a.c.s.VersionLoggerListener 97] - OS Version: 4.4.0-34-generic 2016-08-20 04:40:13,036[main] [INFO ] [o.a.c.s.VersionLoggerListener 99] - Architecture: amd64 2016-08-20 04:40:13,037[main] [INFO ] [o.a.c.s.VersionLoggerListener 101] - Java Home: /usr/lib/jvm/java-1.8-openjdk/jre 2016-08-20 04:40:13,037[main] [INFO ] [o.a.c.s.VersionLoggerListener 103] - JVM Version: 1.8.0_92-internal-alpine-r1-b14 2016-08-20 04:40:13,038[main] [INFO ] [o.a.c.s.VersionLoggerListener 105] - JVM Vendor: Oracle Corporation 2016-08-20 04:40:13,038[main] [INFO ] [o.a.c.s.VersionLoggerListener 107] - CATALINA_BASE: /home/user/che/tomcat 2016-08-20 04:40:13,039[main] [INFO ] [o.a.c.s.VersionLoggerListener 109] - CATALINA_HOME: /home/user/che/tomcat 2016-08-20 04:40:13,040[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.util.logging.config.file=/home/user/che/tomcat/conf/logging.properties 2016-08-20 04:40:13,041[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 2016-08-20 04:40:13,045[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Xms256m 2016-08-20 04:40:13,046[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Xmx1024m 2016-08-20 04:40:13,051[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.security.egd=file:/dev/./urandom 2016-08-20 04:40:13,053[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dport.http=8080 2016-08-20 04:40:13,056[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.home=/home/user/che 2016-08-20 04:40:13,059[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.logs.dir=/home/user/che/tomcat/logs/ 2016-08-20 04:40:13,069[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.logs.level=INFO 2016-08-20 04:40:13,069[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote 2016-08-20 04:40:13,070[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote.ssl=false 2016-08-20 04:40:13,079[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote.authenticate=false 2016-08-20 04:40:13,087[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.local.conf.dir=/home/user/che/conf/ 2016-08-20 04:40:13,088[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.endorsed.dirs=/home/user/che/tomcat/endorsed 2016-08-20 04:40:13,089[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcatalina.base=/home/user/che/tomcat 2016-08-20 04:40:13,089[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcatalina.home=/home/user/che/tomcat 2016-08-20 04:40:13,090[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.io.tmpdir=/home/user/che/tomcat/temp 2016-08-20 04:40:13,545[main] [INFO ] [o.a.c.http11.Http11NioProtocol 425] - Initializing ProtocolHandler ["http-nio-8080"] 2016-08-20 04:40:13,591[main] [INFO ] [o.a.t.util.net.NioSelectorPool 72] - Using a shared selector for servlet write/read 2016-08-20 04:40:13,599[main] [INFO ] [o.a.catalina.startup.Catalina 591] - Initialization processed in 1301 ms 2016-08-20 04:40:13,644[main] [INFO ] [c.m.JmxRemoteLifecycleListener 332] - The JMX Remote Listener has configured the registry on port 32001 and the server on port 32101 for the Platform server 2016-08-20 04:40:13,645[main] [INFO ] [o.a.c.core.StandardService 435] - Starting service Catalina 2016-08-20 04:40:13,645[main] [INFO ] [o.a.c.core.StandardEngine 259] - Starting Servlet Engine: Apache Tomcat/8.0.32 2016-08-20 04:40:13,767[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 910] - Deploying web application archive /home/user/che/tomcat/webapps/dashboard.war 2016-08-20 04:40:14,722[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 974] - Deployment of web application archive /home/user/che/tomcat/webapps/dashboard.war has finished in 954 ms 2016-08-20 04:40:14,730[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 910] - Deploying web application archive /home/user/che/tomcat/webapps/wsmaster.war 2016-08-20 04:40:20,579[ost-startStop-1] [WARN ] [p.DockerExtConfBindingProvider 51] - DockerExtConfBindingProvider 2016-08-20 04:40:24,628[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 974] - Deployment of web application archive /home/user/che/tomcat/webapps/wsmaster.war has finished in 9,898 ms 2016-08-20 04:40:24,632[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 910] - Deploying web application archive /home/user/che/tomcat/webapps/swagger.war 2016-08-20 04:40:24,846[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 974] - Deployment of web application archive /home/user/che/tomcat/webapps/swagger.war has finished in 214 ms 2016-08-20 04:40:24,855[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 910] - Deploying web application archive /home/user/che/tomcat/webapps/ROOT.war 2016-08-20 04:40:26,937[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 974] - Deployment of web application archive /home/user/che/tomcat/webapps/ROOT.war has finished in 2,082 ms 2016-08-20 04:40:26,948[main] [INFO ] [o.a.c.http11.Http11NioProtocol 470] - Starting ProtocolHandler ["http-nio-8080"] 2016-08-20 04:40:26,968[main] [INFO ] [o.a.catalina.startup.Catalina 642] - Server startup in 13366 ms 2016-08-20 04:40:59,357[nio-8080-exec-4] [INFO ] [o.e.c.a.w.s.WorkspaceManager 689] - Workspace 'che:wksp-yyf3' with id 'workspace8yygmjfahc470fgr' created by user 'che' 2016-08-20 04:41:00,497[kspaceManager-0] [INFO ] [o.e.c.a.m.s.MachineManager 162] - Creating machine [ws = workspace8yygmjfahc470fgr: env = default: machine = default] 2016-08-20 04:41:36,706[kspaceManager-0] [INFO ] [c.p.d.m.DockerInstanceProvider 588] - Machine with id 'machineawbsyb3lfgo7r15f' backed by container '9d1d6dd8ca03d156aaee31314bc5a22297d0cf49ef02c561b067a5fa3e54203b' has been deployed on node 'localhost' 2016-08-20 04:42:11,128[kspaceManager-0] [INFO ] [o.e.c.a.m.s.MachineManager 171] - Machine [ws = workspace8yygmjfahc470fgr: env = default: machine = default] was successfully created, its id is 'machineawbsyb3lfgo7r15f' 2016-08-20 04:42:11,139[kspaceManager-0] [INFO ] [o.e.c.a.w.s.WorkspaceManager 534] - Workspace 'che:wksp-yyf3' with id 'workspace8yygmjfahc470fgr' started by user 'che'

Reproduction Steps:

  1. [First Step]
  2. [Second Step]
  3. [Other Steps...]

Expected behavior:

[Describe expected behavior here]

Observed behavior:

[Describe observed behavior here]

Che version: [Enter Che version here]

OS and version: [Enter OS name and version here]

root@ipaclient:~# uname -a Linux ipaclient.openshift.loc 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Docker version: [Enter your Docker version here docker version on CLI]

root@ipaclient:~# docker version Client: Version: 1.11.2 API version: 1.23 Go version: go1.6.2 Git commit: b9f10c9 Built: Thu, 16 Jun 2016 21:17:51 +1200 OS/Arch: linux/amd64

Server: Version: 1.11.2 API version: 1.23 Go version: go1.6.2 Git commit: b9f10c9 Built: Thu, 16 Jun 2016 21:17:51 +1200 OS/Arch: linux/amd64

Che install: [Vagrant, Docker container, server (zip), Bitnami, Yatta, or Codenvy?]

Docker

Additional information:

From yesterday onwards I am trying to configure Eclipse Che.

rajasekaran07 commented 8 years ago

I had searched similar kind of issues. Most of the solutions are stated that we need to start che with local IP --rmote:IP tag. But i am not aware how to use --r flag in docker. Can someone help me on this.

TylerJewell commented 8 years ago

See this docs page. With the new launcher you want to set the CHE_HOST_IP variable. That is the same as setting the old remote property. Hope this helps.

https://eclipse-che.readme.io/docs/usage-docker

rajasekaran07 commented 8 years ago

root@ipaclient:~# export DOCKER_VM_IP=$(docker run --rm --net host alpine sh -c "ip a show eth0" | \

                grep 'inet ' | cut -d/ -f1 | awk '{ print $2}')           ip: can't find device 'eth0'

root@ipaclient:~# export DOCKER_VM_IP=$(docker run --rm --net host alpine sh -c "ip a show ens18" | \ grep 'inet ' | cut -d/ -f1 | awk '{ print $2}') root@ipaclient:~# sudo ifconfig ens18 alias $DOCKER_VM_IP sudo: unable to resolve host ipaclient.openshift.loc: Connection timed out alias: Host name lookup failure ifconfig: `--help' gives usage information.

rajasekaran07 commented 8 years ago

@eivantsov @TylerJewell Again I have created fresh VM and tried with the URL provided by @TylerJewell but it also showing same error.

TylerJewell commented 8 years ago

@rajasekaran07 - please, your notes are not easy to follow. Please, you must be a bit more organized in the posting of the issue and the reproduction steps. We have some posting guidelines. You need to be clear in documenting the full syntax of what you ran with all configuration variables & environment variables. And please, only use the syntax located in our Usage Local documentation.

It should be something like:

# Can you upgrade to Docker 1.12 over 1.11 for the most stability.
ifconfig   # Identify the IP address of the server - look for eth0 or eth1

# Set the external IP address
export CHE_HOST_IP=<proper-ip-of-server>

# Start che
docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock eclipse/che start

See the following docs on how Che handles networking configuration: https://eclipse-che.readme.io/docs/networking

TylerJewell commented 8 years ago

@rajasekaran07 - you are running a 1.11 daemon, and your issue may be related to the Docker issue that is being discussed on this thread.

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

rajasekaran07 commented 8 years ago

@TylerJewell - Here the steps I followed to install Eclipse Che..

  1. Created Ubuntu 16.04 Virtual server
  2. Installed Docker 1.11 Daemon
  3. Pulled Che docker image and started by following commend. docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock codenvy/che-launcher start
  4. I am able to open Eclipse Che using IPADDRESS:8080 but I am unable to created New project.
  5. After I had removed Eclipse-Che server from my VM.
  6. I run the below command to get che.sh $ curl -sL https://raw.githubusercontent.com/eclipse/che/master/che.sh > /usr/local/bin/che $ chmod +x /usr/local/bin/che
  7. I had tried "che -r:IPADDRESS start" but it was not successful. (Here I was using my VM static IP address ).

    I am Looking forward some step by step guidance.

rajasekaran07 commented 8 years ago

@TylerJewell - I have upgraded my Docker daemon to 1.12 and followed your instruction but still I am seeing the same issue.

  1. root@ipaclient:~# docker version Client: Version: 1.12.1-rc2 API version: 1.24 Go version: go1.6.3 Git commit: 236317f Built: Wed Aug 17 05:18:04 2016 OS/Arch: linux/amd64

Server: Version: 1.12.1-rc2 API version: 1.24 Go version: go1.6.3 Git commit: 236317f Built: Wed Aug 17 05:18:04 2016 OS/Arch: linux/amd64

  1. root@ipaclient:~# ifconfig docker0 Link encap:Ethernet HWaddr 02:42:cb:d3:f4:af inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

ens18 Link encap:Ethernet HWaddr 62:38:31:39:32:37 inet addr:10.172.112.36 Bcast:10.172.112.255 Mask:255.255.255.0 inet6 addr: fe80::59e6:a821:ca39:93f6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:403 errors:0 dropped:0 overruns:0 frame:0 TX packets:448 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:84349 (84.3 KB) TX bytes:107530 (107.5 KB)

  1. root@ipaclient:~# export CHE_HOST_IP=10.172.112.36 root@ipaclient:~# echo $CHE_HOST_IP 10.172.112.36
  2. root@ipaclient:~# docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock eclipse/che start

INFO: ECLIPSE CHE: ALREADY HAVE IMAGE codenvy/che-server:latest INFO: ECLIPSE CHE: CONTAINER STARTING INFO: ECLIPSE CHE: SERVER LOGS AT "docker logs -f che-server" INFO: ECLIPSE CHE: SERVER BOOTING... INFO: ECLIPSE CHE: BOOTED AND REACHABLE INFO: ECLIPSE CHE: http://localhost:8080

  1. Che Logs:

2016-08-22 05:55:09,033[main] [INFO ] [o.a.catalina.startup.Catalina 642] - Server startup in 26375 ms

2016-08-22 05:56:47,467[nio-8080-exec-1] [INFO ] [o.e.c.a.w.s.WorkspaceManager 689] - Workspace 'che:wksp-atsz' with id 'workspaceq0ow34xu5xaf9ksh' created by user 'che' 2016-08-22 05:56:48,599[kspaceManager-0] [INFO ] [o.e.c.a.m.s.MachineManager 162] - Creating machine [ws = workspaceq0ow34xu5xaf9ksh: env = default: machine = default] 2016-08-22 05:56:55,311[kspaceManager-0] [INFO ] [c.p.d.m.DockerInstanceProvider 588] - Machine with id 'machinexukwzf7udze0i6wg' backed by container 'a5c67d217b19d274ffdeac4fbb69107a75fd89b7dec7202f05c002abe1792d19' has been deployed on node 'localhost' 2016-08-22 05:57:21,519[kspaceManager-0] [INFO ] [o.e.c.a.m.s.MachineManager 171] - Machine [ws = workspaceq0ow34xu5xaf9ksh: env = default: machine = default] was successfully created, its id is 'machinexukwzf7udze0i6wg' 2016-08-22 05:57:21,525[kspaceManager-0] [INFO ] [o.e.c.a.w.s.WorkspaceManager 534] - Workspace 'che:wksp-atsz' with id 'workspaceq0ow34xu5xaf9ksh' started by user 'che'

  1. The list of container after I have created workspace.

root@ipaclient:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a5c67d217b19 eclipse-che/workspaceq0ow34xu5xaf9ksh_machinexukwzf7udze0i6wg_che_default "/bin/sh -c 'sudo /us" 4 minutes ago Up 4 minutes 0.0.0.0:32774->22/tcp, 0.0.0.0:32773->4401/tcp, 0.0.0.0:32772->4403/tcp, 0.0.0.0:32771->4411/tcp, 0.0.0.0:32770->8000/tcp, 0.0.0.0:32769->8080/tcp, 0.0.0.0:32768->9876/tcp workspaceq0ow34xu5xaf9ksh_machinexukwzf7udze0i6wg_che_default 39bbac72fc1c codenvy/che-server:latest "/home/user/che/bin/c" 7 minutes ago Up 7 minutes 8000/tcp, 0.0.0.0:8080->8080/tcp che-server

My workspace is running fine

image

root@ipaclient:~# che info WARNING: No swap limit support DEBUG: --------------------------------------- DEBUG: --------- CHE CLI DEBUG INFO -------- DEBUG: --------------------------------------- DEBUG: DEBUG: --------- PLATFORM INFO ------------- DEBUG: DOCKER_INSTALL_TYPE = native DEBUG: DOCKER_HOST_IP = 172.17.0.1 DEBUG: IS_DOCKER_FOR_WINDOWS = NO DEBUG: IS_DOCKER_FOR_MAC = NO DEBUG: IS_BOOT2DOCKER = NO DEBUG: IS_NATIVE = YES DEBUG: HAS_DOCKER_FOR_WINDOWS_IP = NO DEBUG: IS_MOBY_VM = NO DEBUG: DEBUG: --------------------------------------- DEBUG: --------------------------------------- DEBUG: --------------------------------------- INFO: INFO: ECLIPSE CHE: FOUND IMAGE codenvy/che-launcher:latest INFO: ECLIPSE CHE: LAUNCHING LAUNCHER

root@ipaclient:~# docker info Containers: 10 Running: 1 Paused: 0 Stopped: 9 Images: 10 Server Version: 1.12.1-rc2 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 85 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge null host overlay Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: apparmor seccomp Kernel Version: 4.4.0-34-generic Operating System: Ubuntu 16.04.1 LTS OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 3.859 GiB Name: ipaclient.openshift.loc ID: UPIF:XZJA:K6EF:LLBV:VRLO:3RTA:JIGD:TSYP:BI3G:HRRJ:YK7U:GTP2 Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ WARNING: No swap limit support Insecure Registries: 127.0.0.0/8

Looking forward for further assistance...

rajasekaran07 commented 8 years ago

@TylerJewell - Finally its working with following command and my build was successful.. Thank you so much for your assistance.

docker run --rm --net=host --name che -v /var/run/docker.sock:/var/run/docker.sock -v /home/user/che/lib:/home/user/che/lib-copy -v /home/user/che/workspaces:/home/user/che/workspaces -v /home/user/che/storage:/home/user/che/storage codenvy/che-server --remote:

[INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:22 min [INFO] Finished at: 2016-08-22T06:17:09+00:00 [INFO] Final Memory: 18M/60M

TylerJewell commented 8 years ago

@rajasekaran07 - glad you got this to work.

I noticed in your original syntax that you are making things a bit harder than necessary. If you have the Che CLI installed, all you would need to do is setup an environment variable.

export CHE_HOST_IP=<ip-addr>
che start

or

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -e CHE_HOST_IP=<ip> eclipse/che start

These are the same syntax as what you did with the more involved codenvy/che-server syntax.

rajasekaran07 commented 8 years ago

if I am using above command I am getting the following error

bcause@ipaclient:~$ export CHE_HOST_IP=10.172.112.36 bcause@ipaclient:~$ che start WARNING: No swap limit support INFO: ECLIPSE CHE: FOUND IMAGE codenvy/che-launcher:latest INFO: ECLIPSE CHE: LAUNCHING LAUNCHER unknown flag: --e See 'docker run --help'.

The below one is working as expected. "docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -e CHE_HOST_IP= eclipse/che start"

TylerJewell commented 8 years ago

This is a bug related to bash on certain Linux systems. I believe we have corrected this in the cli version that is in master.

rajasekaran07 commented 8 years ago

Thank you for your time and effect.