-
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
eclipse che problem "start injecting workspace agent #1069
Comments
Can you share server logs? |
istening for transport dt_socket at address: 8000 |
Logs show that server has successfully connected to the ws-agent. So, it seems browser failed to connect to ws-agent. Can you specify which browser do you use? Also, can you open browser's dev console, network tab and take a look if websocket connections are initiated and what IP is used? |
G$ @ _app-0.js:4822 |
so the IDE cannot get to the workspace agent....setup is browser using che.sh on Mac, starts virtual box with default image which contains the docker instances....I can give you more logs or all the various IP address...However this is a fresh install with no content yet, so it should be easy to reproduce. The default image of VB was installed by che. Network that the default image uses is NAT. |
Not that easy to reproduce in fact. We are extensively using Macs to test and use Che. 172.16.1.178 is the VM IP address, correct? |
I started the che server as docker image using --image and it immediatelly works. 172.16.1.178 is the VM ip address yes |
I think the IDE server cannot get to the workspace agent within the docker image in the virtual box.... I tried che 4.0.0.RC11 and 4.0.1 both on two machines. The setup with 4.0.0.RC11 did work on my MBP without problems but then just replacing it with 4.0.1 shows this problem. Now moving to a new Mac Mini, I cant get any of the two version to work. Do I have to setup a port mapping on the virtual box image ? |
No special setup is required. We auto detect VM IP and server uses it to ping ws agent and then browser uses the same IP to connect to the workspace. And yes, the IDE (client) cannot get to workspace agent, but the server can, otherwise machine creation would have failed. |
When connecting to the IDE, what is the exact ws:// address that you see in Network > WS? In both cases, successful and unsuccessful. |
I switched back to my MBP (logs above are my mac mini). First tried the working version so that is eclipse-che-4.0.0.RC1. The websocket address is ws://192.168.99.100:32773/ide/ext/ws/workspacen49sg3590wdve6ty and there everything works. Workspace starts. Then stop che-server and shutdown virtual box image and start eclipse-che 4.0.1 (with same VB default image) now the only ws address I see is ws://localhost:8080/api/ws/workspaceon8o0ponnxalswy1 and ws://localhost:8080/ide/api/ws/workspaceon8o0ponnxalswy1 |
actually when its working I see that it first calls this ws://localhost:8080/ide/api/ws/workspacen49sg3590wdve6ty and then ws://192.168.99.100:32773/ide/ext/ws/workspacen49sg3590wdve6ty while it other not working case it only calls the first url. |
Wrong IP then when running Che natively. When in a Docker image, we use the right VM IP - 192.168.99.100. Can you run Che natively, (without -i) but with -r:192.168.99.100? |
still the same problem.....here is the start of the log (this is eclipse-che-4.0.1 on the MBP where eclipse-che-4.0.0.RC11 is working) ccmac:bin christian$ ./che.sh -r:192.168.99.100 run ############## HOW TO CONNECT YOUR CHE CLIENT ###############
Using CATALINA_BASE: /Users/christian/workspace/eclipse-che-4.0.1/tomcat |
it still connects to ws://localhost:8080/ide/api/ws/workspaceon8o0ponnxalswy1 in the browser |
First connection to localhost is ok, this is where workspace API is running. Any exceptions in Console? |
it connects to locationhost twice....here is the console and there seems to be a problem vendor-6af275bfdb.js:33500You are using the ngTouch module. |
using latest chrome |
here is what the API of the workspace master gives me as meta information about the workspace in question. [ |
It's system specific problem as I see it. Failed to construct 'WebSocket': The URL 'ws/ide/ext/ws/workspaceon8o0ponnxalswy1' is invalid. Which means Che failed to build a proper URL. What's your Docker version? |
1.9.1 |
Can you update your Docker to the latest version to see if it fixes the problem? |
changed to Docker 1.11. still the same |
ifconfig on your Mac please? |
interesting enough I moved my MBP from my company LAN back to home LAN, I left che and the VirtualBox running and just did a refresh in the browser and everything works..... I will check again tomorrow at my company why it doesnt work there...... |
I bet this has smth to do with websockets being blocked. |
well at home it first connects to a localhost ws connection and then to the correct one. I not sure where it gets the host name for the url where it should connect to but for some reasons that works here and doens in my company. my home ip is 192.168.0.x and the docker host is 192.168.99.100. At work we have 172.16.0 etc. while the docker host is the same. Maybe something with network being an unusual setup. |
The second URL is your VM IP. While server is running on localhost. So, everything as expected. |
I think the problem is related to websockets being blocked. The right URL should be I cannot reproduce it in any network I used. Closing the issue now, feel free to reopen if you believe it's Che fault. |
closing is ok. There are some network related issues beyond the scope of CHE. For example if you run the CHE server on Mac and the docker instances within the Virtual Box on the same machine then if you use the default NAT for network interface the setup works if your browser is the local machine. (at least at the end that part worked). However if you connect to the CHE server from a second computer, then the web interface works but as soon as you open the IDE, the browser cannt connect to the docker instance. The reason is that the IP address from the virtualbox are only routed on the first computer and not accessible from the second. So my attempt to install a CHE server on a Mac that the whole department could use didnt work. Not sure if that is clear but the IP address that is used for websocket "192.168.99.100" is not accessible from other computers but any of the browsers want to directly connect to it. |
+1 |
_1 Upvote_ I install eclipse che 4.0.1 on Mac OS X 10.11. Fresh and new Virtual Box 5.0. (only one "default" machine with 4 GB memory) I start the eclipse che server and create a new project "web-spring-servlet" with "java" workspace setting.
The setup starts and hangs when "Inject and start workspace agent"
Error log is this
[STDOUT] Listening for transport dt_socket at address: 4403
[STDOUT] 2016-04-18 14:25:39,097[main] [INFO] [o.a.c.s.VersionLoggerListener 89] - Server version: Apache Tomcat/8.0.29
[STDOUT] 2016-04-18 14:25:39,100[main] [INFO] [o.a.c.s.VersionLoggerListener 91] - Server built: Nov 20 2015 09:18:00 UTC
[STDOUT] 2016-04-18 14:25:39,108[main] [INFO] [o.a.c.s.VersionLoggerListener 93] - Server number: 8.0.29.0
[STDOUT] 2016-04-18 14:25:39,109[main] [INFO] [o.a.c.s.VersionLoggerListener 95] - OS Name: Linux
[STDOUT] 2016-04-18 14:25:39,109[main] [INFO] [o.a.c.s.VersionLoggerListener 97] - OS Version: 4.1.19-boot2docker
[STDOUT] 2016-04-18 14:25:39,110[main] [INFO] [o.a.c.s.VersionLoggerListener 99] - Architecture: amd64
[STDOUT] 2016-04-18 14:25:39,112[main] [INFO] [o.a.c.s.VersionLoggerListener 101] - Java Home: /opt/jdk1.8.0_45/jre
[STDOUT] 2016-04-18 14:25:39,113[main] [INFO] [o.a.c.s.VersionLoggerListener 103] - JVM Version: 1.8.0_45-b14
[STDOUT] 2016-04-18 14:25:39,115[main] [INFO] [o.a.c.s.VersionLoggerListener 105] - JVM Vendor: Oracle Corporation
[STDOUT] 2016-04-18 14:25:39,115[main] [INFO] [o.a.c.s.VersionLoggerListener 107] - CATALINA_BASE: /home/user/che/ws-agent
[STDOUT] 2016-04-18 14:25:39,116[main] [INFO] [o.a.c.s.VersionLoggerListener 109] - CATALINA_HOME: /home/user/che/ws-agent
[STDOUT] 2016-04-18 14:25:39,117[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.util.logging.config.file=/home/user/che/ws-agent/conf/logging.properties
[STDOUT] 2016-04-18 14:25:39,117[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[STDOUT] 2016-04-18 14:25:39,118[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Xms256m
[STDOUT] 2016-04-18 14:25:39,119[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Xmx1024m
[STDOUT] 2016-04-18 14:25:39,119[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.security.egd=file:/dev/./urandom
[STDOUT] 2016-04-18 14:25:39,120[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.logs.dir=/home/user/che/ws-agent/logs
[STDOUT] 2016-04-18 14:25:39,121[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote
[STDOUT] 2016-04-18 14:25:39,121[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote.ssl=false
[STDOUT] 2016-04-18 14:25:39,122[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
[STDOUT] 2016-04-18 14:25:39,122[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.local.conf.dir=/mnt/che/conf
[STDOUT] 2016-04-18 14:25:39,123[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -agentlib:jdwp=transport=dt_socket,address=4403,server=y,suspend=n
[STDOUT] 2016-04-18 14:25:39,124[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.endorsed.dirs=/home/user/che/ws-agent/endorsed
[STDOUT] 2016-04-18 14:25:39,125[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcatalina.base=/home/user/che/ws-agent
[STDOUT] 2016-04-18 14:25:39,125[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcatalina.home=/home/user/che/ws-agent
[STDOUT] 2016-04-18 14:25:39,126[main] [INFO] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.io.tmpdir=/home/user/che/ws-agent/temp
[STDOUT] 2016-04-18 14:25:39,303[main] [INFO] [o.a.c.http11.Http11NioProtocol 425] - Initializing ProtocolHandler ["http-nio-4401"]
[STDOUT] 2016-04-18 14:25:39,323[main] [INFO] [o.a.t.util.net.NioSelectorPool 72] - Using a shared selector for servlet write/read
[STDOUT] 2016-04-18 14:25:39,328[main] [INFO] [o.a.catalina.startup.Catalina 587] - Initialization processed in 588 ms
[STDOUT] 2016-04-18 14:25:39,348[main] [INFO] [c.m.JmxRemoteLifecycleListener 332] - The JMX Remote Listener has configured the registry on port 32002 and the server on port 32102 for the Platform server
[STDOUT] 2016-04-18 14:25:39,350[main] [INFO] [o.a.c.core.StandardService 433] - Starting service Catalina
[STDOUT] 2016-04-18 14:25:39,352[main] [INFO] [o.a.c.core.StandardEngine 259] - Starting Servlet Engine: Apache Tomcat/8.0.29
[STDOUT] 2016-04-18 14:25:39,431[ost-startStop-1] [INFO] [o.a.c.startup.HostConfig 916] - Deploying web application archive /home/user/che/ws-agent/webapps/ide.war
[STDOUT] 2016-04-18 14:25:45,588[rrest.WSClient1] [INFO] [.c.a.c.n.WSocketEventBusClient 223] - Open connection to ws://che-host:8080/ide/api/eventbus/?token=dummy_token.
[STDOUT] Mon Apr 18 14:25:45 UTC 2016 - [localhost-startStop-1] Product-specified preferences called before plugin is started
[STDOUT] 2016-04-18 14:25:45,895[ost-startStop-1] [INFO] [o.a.c.startup.HostConfig 980] - Deployment of web application archive /home/user/che/ws-agent/webapps/ide.war has finished in 6,463 ms
[STDOUT] 2016-04-18 14:25:45,900[main] [INFO] [o.a.c.http11.Http11NioProtocol 470] - Starting ProtocolHandler ["http-nio-4401"]
[STDOUT] 2016-04-18 14:25:45,906[main] [INFO] [o.a.catalina.startup.Catalina 638] - Server startup in 6578 ms
[STDOUT] 2016-04-18 14:25:46,272[nio-4401-exec-1] [WARN ] [i.ContainerResponse$BodyWriter 90] - Client has aborted connection. Response writing omitted.
The text was updated successfully, but these errors were encountered: