Skip to content
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

Connection failed with terminal #2322

Closed
mariosotil opened this issue Sep 3, 2016 · 7 comments
Closed

Connection failed with terminal #2322

mariosotil opened this issue Sep 3, 2016 · 7 comments
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Milestone

Comments

@mariosotil
Copy link

mariosotil commented Sep 3, 2016

I built Eclipse 4.8.x. I'm using this script to start it up.

# Prints the IP address
echo "DOCKER_VM_IP=${DOCKER_VM_IP}"

ECLIPSE_CHE_VERSION=eclipse-che-4.8.0-SNAPSHOT
echo "Starting Eclipse Che - ${ECLIPSE_CHE_VERSION}"
cd ~/Documents/workspaces/my-eclipse-che-developer/che/assembly/assembly-main/target/${ECLIPSE_CHE_VERSION}/${ECLIPSE_CHE_VERSION}
bin/che.sh --debug

After create and run a new workspace, I got this.
screen shot 2016-09-03 at 1 18 45 am

May you help me and tell me what I'm missing?

This is my configuration:

  • Mac OS X El Capitan
  • I built Eclipse Che using the branch master (4.8.0-SNAPSHOT)
  • Docker for Mac 1.12.0-a (build: 11213)
  • Docker Toolbox 1.12
  • Java 1.8.0_92
  • Virtualbox 5.0.26 r108824

This is che.properties

#
# Copyright (c) 2012-2016 Codenvy, S.A.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#   Codenvy, S.A. - initial API and implementation
#

# workspace proxy configuration
http.proxy=
https.proxy=
no_proxy=

### Storage and user configuration
# The location where your workspaces (and their projects) are stored.
# This property works for Docker for Windows, Mac, and Linux.
# On virtualbox for windows, this property is ignored. Instead, they are stored at:
# c:\%userprofile%\AppData\Local\Eclipse Che\
che.workspace.storage=${che.home}/workspaces

# Your projects are synchronized from the Che server into the machine running each
# workspace. This is the directory in the machine where your projects are placed.
che.machine.projects.internal.storage=/projects

# Che stores various internal data objects as JSON on the file system.
che.conf.storage=${che.home}/storage

### Configuration of embedded templates and samples
# Folder that contains JSON files with code templates and samples
project.template_description.location_dir=${che.home}/templates

### Configuration of embedded stacks
#Path to predefined stacks json
che.stacks.default=${che.home}/stacks/stacks.json
#Path to folder with predefined stack icons
che.stacks.images.storage=${che.home}/stacks/images

### oAuth configuration. You can setup GitHub oAuth to automate authentication to remote
### repositories. You need to first register this application with GitHub oAuth.
# GitHub application client ID
oauth.github.clientid=NULL
oauth.github.clientsecret=NULL
oauth.github.authuri= https://github.com/login/oauth/authorize
oauth.github.tokenuri= https://github.com/login/oauth/access_token
oauth.github.redirecturis= http://localhost:${SERVER_PORT}/wsmaster/api/oauth/callback
auth.oauth.access_denied_error_page=/error-oauth

# Activates user self-service at the API level.
# Che has a single identity implementation, so this does not change the user experience.
# If true, enables user creation at API level
user.self.creation.allowed=false

# Remove locations where internal message bus events should be propagated to.
# For debugging - set to retrieve internal events from external clients.
notification.server.propagate_events=

# Che extensions can be scheduled executions on a time basis. 
# This configures the size of the thread pool allocated to extensions that are launched on
# a recurring schedule.
schedule.core_pool_size=10

### Docker is the default machine implementation within Che. Workspaces are powered by machines
### that are constructed when the workspace is started. The images used to generate containers
### for the machines can come from DockerHub or a private Docker registry.
machine.docker.registry=${CHE_REGISTRY_HOST}:5000
machine.docker.snapshot.registry_namespace=NULL
machine.docker.unused_containers_cleanup_period_min=60

### Docker registry auth config example. Note that you can configure many registries with different names.
#docker.registry.auth.your_registry_name.url=https://index.docker.io/v1/
#docker.registry.auth.your_registry_name.username=user-name
#docker.registry.auth.your_registry_name.password=user-password

docker.api.version=1.20
docker.connection.tcp.connection_timeout_ms=600000
docker.connection.tcp.read_timeout_ms=600000

### Machine configuration.  Machines power workspaces. This configures the Che behaviors that
### occur within the machine.

# This archive contains the server to run the workspace agent and any custom extensions.
# Che injects this archive into machines when they are booted or started.
machine.server.ext.archive=${che.home}/lib/ws-agent.zip

# The machine's log files are stored here
machine.logs.location=${che.logs.dir}/machine/logs

# Size of the machine by default.  What is used if RAM parameter not provided by user or API.
machine.default_mem_size_mb=1024

# When the workspace master launches a new workspace, Che performs checks of the internal Web 
# services. When Che gets a valid response, we know that the workspace agent is ready for use.
machine.ws_agent.max_start_time_ms=60000
machine.ws_agent.ping_delay_ms=2000
machine.ws_agent.ping_conn_timeout_ms=2000
machine.ws_agent.ping_timed_out_error_msg=Timeout reached. The Che server has been unable to verify that your workspace's agent has successfully booted. Either the workspace is unreachable, the agent had an error during startup, or your workspace is starting slowly. You can configure machine.ws_agent.max_start_time_ms in Che properties to increase the timeout.

# Hosts listed here will be added to /etc/hosts of each workspace machine.
# Add an entry here if you write a ws-agent extension that needs to communicate outside the machine
machine.docker.machine_extra_hosts=NULL

# This is the API endpoint of the workspace master running within the core Che server.
# This tells the workspace agent how to connect back to the Che server.
# che-host is a fake DNS hostname that Che creates for itself.
machine.docker.che_api.endpoint=http://che-host:${SERVER_PORT}/wsmaster/api

# If this is true, then we always pull an image from a registry even if we have an image cached
# locally. If false, Docker only pulls image if it does not exist locally.
machine.docker.pull_image=true

# If true, then all docker machines will start in privilege mode.
machine.docker.privilege_mode=false

# If the browser clients that are accessing Che are remote AND the configuration of Docker is an
# internal IP address or using Unix sockets, then remote browser clients will not be able to connect
# to the workspace. Set the Docker configuration so that Docker containers have an external IP 
# address and provide this host or IP address here.
machine.docker.local_node_host=NULL

# Allows to use registry for machine snapshots, you should set this property to {true},
# otherwise workspace snapshots would be saved locally.
machine.docker.snapshot_use_registry=false

# Allows to adjust machine swap memory by multiplication current machnine memory on provided value.
# default is -1 which means unlimited swap, if set multiplier value equal to 0.5 machine swap will be
# configured with size that equal to half of current machine memory, to disable swap set it to 0.
machine.docker.memory_swap_multiplier=-1

# URL path to api service.  
# Browser clients use this to initiate REST communications with workspace master
api.endpoint=http://localhost:${SERVER_PORT}/wsmaster/api

#### Everrest is a Java Web Services toolkit that manages JAX-RS & web socket communications
#### Users should rarely need to configure this.
# Disable asynchronous mechanism that is embedded in everrest.
org.everrest.asynchronous=false
# Quantity of asynchronous requests which may be processed at the same time
org.everrest.asynchronous.pool.size=20
# Size of queue. If asynchronous request can't be processed after consuming it will be added in queue.
org.everrest.asynchronous.queue.size=500
# Timeout in minutes for request. If after timeout request is not done or client did not come yet to get result of request it may be discarded.
org.everrest.asynchronous.job.timeout=10
# Size of cache for waiting, running and ended request.
org.everrest.asynchronous.cache.size=1024
# Path to asynchronous service
org.everrest.asynchronous.service.path=/async/

machine.ssh.connection_timeout_ms=10000
# The location of the Web Socket terminal used within the browser.
# This is copied into the machine and run from within it.
# Suffix helps differentiate archive for different architectures/OSes
machine.server.terminal.path_to_archive.linux_amd64=${che.home}/lib/linux_amd64/terminal
machine.server.terminal.path_to_archive.linux_arm7=${che.home}/lib/linux_arm7/terminal

# During the stop of the workspace automatically creates a snapshot if the value is {true},
# otherwise just stops the workspace.
workspace.runtime.auto_snapshot=true
# During the start of the workspace automatically restored it from a snapshot if the value is {true},
# otherwise just creates the new workspace.
workspace.runtime.auto_restore=true

# Reserved user names
user.reserved_names=

# java opts for dev machine
che.machine.java_opts=-Xms256m -Xmx2048m -Djava.security.egd=file:/dev/./urandom

These lines are at the end of ~/.bash_profile

export DOCKER_VM_IP=$(docker run --rm --net host alpine sh -c "ip a show eth0" | \
                    grep 'inet ' | cut -d/ -f1 | awk '{ print $2}')

sudo ifconfig lo0 alias $DOCKER_VM_IP

These are the logs

eclipse-che-logs.zip

EDIT: I can run Eclipse Che using the CLI with no problems. I run it with this script, and the same che.properties file

# Prints the IP address
echo "DOCKER_VM_IP=${DOCKER_VM_IP}"

export CHE_CONF_FOLDER=~/Documents/workspaces/my-eclipse-che-developer/che/assembly/assembly-main/target/eclipse-che-4.8.0-SNAPSHOT/eclipse-che-4.8.0-SNAPSHOT/conf
echo "CHE_CONF_FOLDER=${CHE_CONF_FOLDER}"

bash che start

The console looks like this

$ eclipse-che/start-eclipse-che-docker.sh 
DOCKER_VM_IP=192.168.65.2
CHE_CONF_FOLDER=/Users/username/Documents/workspaces/my-eclipse-che-developer/che/assembly/assembly-main/target/eclipse-che-4.8.0-SNAPSHOT/eclipse-che-4.8.0-SNAPSHOT/conf
INFO: ECLIPSE CHE: Found image codenvy/che-launcher:latest
INFO: ECLIPSE CHE: Starting launcher
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

And this is the log

$ docker logs che-server
2016-09-03 05:55:37,768[main]             [INFO ] [o.a.c.s.VersionLoggerListener 89]    - Server version:        Apache Tomcat/8.0.32
2016-09-03 05:55:37,770[main]             [INFO ] [o.a.c.s.VersionLoggerListener 91]    - Server built:          Feb 2 2016 19:34:53 UTC
2016-09-03 05:55:37,770[main]             [INFO ] [o.a.c.s.VersionLoggerListener 93]    - Server number:         8.0.32.0
2016-09-03 05:55:37,770[main]             [INFO ] [o.a.c.s.VersionLoggerListener 95]    - OS Name:               Linux
2016-09-03 05:55:37,771[main]             [INFO ] [o.a.c.s.VersionLoggerListener 97]    - OS Version:            4.4.15-moby
2016-09-03 05:55:37,771[main]             [INFO ] [o.a.c.s.VersionLoggerListener 99]    - Architecture:          amd64
2016-09-03 05:55:37,772[main]             [INFO ] [o.a.c.s.VersionLoggerListener 101]   - Java Home:             /usr/lib/jvm/java-1.8-openjdk/jre
2016-09-03 05:55:37,772[main]             [INFO ] [o.a.c.s.VersionLoggerListener 103]   - JVM Version:           1.8.0_92-internal-alpine-r1-b14
2016-09-03 05:55:37,772[main]             [INFO ] [o.a.c.s.VersionLoggerListener 105]   - JVM Vendor:            Oracle Corporation
2016-09-03 05:55:37,773[main]             [INFO ] [o.a.c.s.VersionLoggerListener 107]   - CATALINA_BASE:         /home/user/che/tomcat
2016-09-03 05:55:37,773[main]             [INFO ] [o.a.c.s.VersionLoggerListener 109]   - CATALINA_HOME:         /home/user/che/tomcat
2016-09-03 05:55:37,773[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.util.logging.config.file=/home/user/che/tomcat/conf/logging.properties
2016-09-03 05:55:37,774[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
2016-09-03 05:55:37,774[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Xms256m
2016-09-03 05:55:37,774[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Xmx1024m
2016-09-03 05:55:37,775[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.security.egd=file:/dev/./urandom
2016-09-03 05:55:37,775[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dport.http=8080
2016-09-03 05:55:37,775[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.home=/home/user/che
2016-09-03 05:55:37,776[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.logs.dir=/home/user/che/tomcat/logs/
2016-09-03 05:55:37,776[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.logs.level=INFO
2016-09-03 05:55:37,776[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcom.sun.management.jmxremote
2016-09-03 05:55:37,776[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcom.sun.management.jmxremote.ssl=false
2016-09-03 05:55:37,777[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
2016-09-03 05:55:37,777[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.local.conf.dir=/conf
2016-09-03 05:55:37,777[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.endorsed.dirs=/home/user/che/tomcat/endorsed
2016-09-03 05:55:37,777[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcatalina.base=/home/user/che/tomcat
2016-09-03 05:55:37,777[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcatalina.home=/home/user/che/tomcat
2016-09-03 05:55:37,778[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.io.tmpdir=/home/user/che/tomcat/temp
2016-09-03 05:55:37,866[main]             [INFO ] [o.a.c.http11.Http11NioProtocol 425]  - Initializing ProtocolHandler ["http-nio-8080"]
2016-09-03 05:55:37,881[main]             [INFO ] [o.a.t.util.net.NioSelectorPool 72]   - Using a shared selector for servlet write/read
2016-09-03 05:55:37,884[main]             [INFO ] [o.a.catalina.startup.Catalina 591]   - Initialization processed in 339 ms
2016-09-03 05:55:37,987[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-09-03 05:55:37,988[main]             [INFO ] [o.a.c.core.StandardService 435]      - Starting service Catalina
2016-09-03 05:55:37,989[main]             [INFO ] [o.a.c.core.StandardEngine 259]       - Starting Servlet Engine: Apache Tomcat/8.0.32
2016-09-03 05:55:38,043[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 910]        - Deploying web application archive /home/user/che/tomcat/webapps/ROOT.war
2016-09-03 05:55:39,287[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 1,244 ms
2016-09-03 05:55:39,288[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 910]        - Deploying web application archive /home/user/che/tomcat/webapps/dashboard.war
2016-09-03 05:55:39,399[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 111 ms
2016-09-03 05:55:39,400[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 910]        - Deploying web application archive /home/user/che/tomcat/webapps/swagger.war
2016-09-03 05:55:39,453[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 53 ms
2016-09-03 05:55:39,455[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 910]        - Deploying web application archive /home/user/che/tomcat/webapps/wsmaster.war
2016-09-03 05:55:41,121[ost-startStop-1]  [WARN ] [p.DockerExtConfBindingProvider 51]   - DockerExtConfBindingProvider
2016-09-03 05:55:42,240[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 2,785 ms
2016-09-03 05:55:42,244[main]             [INFO ] [o.a.c.http11.Http11NioProtocol 470]  - Starting ProtocolHandler ["http-nio-8080"]
2016-09-03 05:55:42,250[main]             [INFO ] [o.a.catalina.startup.Catalina 642]   - Server startup in 4364 ms
2016-09-03 05:55:57,556[kspaceManager-0]  [INFO ] [o.e.c.a.m.s.MachineManager 162]      - Creating machine [ws = workspacebr41fcy35mj6dom1: env = default: machine = default]
2016-09-03 05:56:16,723[kspaceManager-0]  [INFO ] [c.p.d.m.DockerInstanceProvider 588]  - Machine with id 'machinepnn8ly2bbtrgu72l' backed by container '4cb6db55a79fec49819297ceb5a2571bb06b499d75a80f3f3a8f7d4e8b49fe56' has been deployed on node 'localhost'
2016-09-03 05:56:26,797[kspaceManager-0]  [INFO ] [o.e.c.a.m.s.MachineManager 171]      - Machine [ws = workspacebr41fcy35mj6dom1: env = default: machine = default] was successfully created, its id is 'machinepnn8ly2bbtrgu72l'
2016-09-03 05:56:26,799[kspaceManager-0]  [INFO ] [o.e.c.a.w.s.WorkspaceManager 534]    - Workspace 'che:wksp-3jzb' with id 'workspacebr41fcy35mj6dom1' started by user 'che'
@TylerJewell
Copy link

Hi - thanks for the detailed bug report. I think this is a duplicate of this error that started appearing a week ago. The root cause has to do with how the web terminal is getting mounted into the workspace in VMs where the system is running remotely.

#2281

@mariosotil
Copy link
Author

mariosotil commented Sep 4, 2016

@TylerJewell Got it. Thank you. I will wait until #1823 be merged, to check this again on OS X. Meanwhile, I will be working with Linux.

@TylerJewell TylerJewell added kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. labels Sep 4, 2016
@riuvshin
Copy link
Contributor

riuvshin commented Sep 5, 2016

Hi! we will introduce a fix for that in bugfix 4.7.1 which will be available later this week, so you don't need to wait #1823 which is planned for 4.8.0 release :)

@JamesDrummond
Copy link
Contributor

@riuvshin Can you add this issue to the 4.7.1 milestone? Was this fixed already in the #2338 PR merged yesterday and is in today nightly image?

@riuvshin
Copy link
Contributor

riuvshin commented Sep 7, 2016

@JamesDrummond It is already included in 4.7.x

@JamesDrummond
Copy link
Contributor

@riuvshin Please add the milestone label.

@mariosotil
Copy link
Author

mariosotil commented Sep 7, 2016

I can confirm that it was solved in 4.7.x. Thank you.

@riuvshin riuvshin added this to the 4.7.1 milestone Sep 8, 2016
@bmicklea bmicklea mentioned this issue Sep 9, 2016
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

4 participants