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

Cannot access Workspace from different PC over LAN #3657

Closed
kallolghose opened this issue Jan 10, 2017 · 13 comments
Closed

Cannot access Workspace from different PC over LAN #3657

kallolghose opened this issue Jan 10, 2017 · 13 comments
Labels
area/doc Issues related to documentation kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@kallolghose
Copy link

I have installed Eclipse CHE locally on my system.
I am able to create workspace from localhost, but when i try to access the workspace from different machine over LAN and getting the following error -

image

The issue does not resolve even after restarting the workspace or loading the URL.
Could some one guide me so as what should be the path forward.

Also find below the logs -

[STDOUT] Exec-agent configuration
[STDOUT] Server
[STDOUT] - Address: :4411
[STDOUT] - Static content: /home/user/che/terminal/
[STDOUT] - Base path: ''
[STDOUT] Terminal
[STDOUT] - Slave command: '/bin/bash'
[STDOUT] - Activity tracking enabled: false
[STDOUT] Process executor
[STDOUT] - Logs dir: /home/user/che/exec-agent/logs
[STDOUT]
[STDOUT] ⇩ Registered HttpRoutes:
[STDOUT]
[STDOUT] Process Routes:
[STDOUT] ✓ Start Process ........................... POST /process
[STDOUT] ✓ Get Process ............................. GET /process/:pid
[STDOUT] ✓ Kill Process ............................ DELETE /process/:pid
[STDOUT] ✓ Get Process Logs ........................ GET /process/:pid/logs
[STDOUT] ✓ Get Processes ........................... GET /process
[STDOUT]
[STDOUT] Channel Routes:
[STDOUT] ✓ Connect to Exec-Agent(webscoket) ........ GET /connect
[STDOUT]
[STDOUT] Terminal routes:
[STDOUT] ✓ Connect to pty(webscoket) ............... GET /pty
[STDOUT]
[STDOUT]
[STDOUT] ⇩ Registered RpcRoutes:
[STDOUT]
[STDOUT] Process Routes:
[STDOUT] ✓ process.start
[STDOUT] ✓ process.kill
[STDOUT] ✓ process.subscribe
[STDOUT] ✓ process.unsubscribe
[STDOUT] ✓ process.updateSubscriber
[STDOUT] ✓ process.getLogs
[STDOUT] ✓ process.getProcess
[STDOUT] ✓ process.getProcesses
Listening for transport dt_socket at address: 4403
2017-01-10 15:20:03,772[main] [INFO ] [o.a.c.s.VersionLoggerListener 89] - Server version: Apache Tomcat/8.0.38
2017-01-10 15:20:03,779[main] [INFO ] [o.a.c.s.VersionLoggerListener 91] - Server built: Oct 6 2016 20:51:55 UTC
2017-01-10 15:20:03,780[main] [INFO ] [o.a.c.s.VersionLoggerListener 93] - Server number: 8.0.38.0
2017-01-10 15:20:03,780[main] [INFO ] [o.a.c.s.VersionLoggerListener 95] - OS Name: Linux
2017-01-10 15:20:03,780[main] [INFO ] [o.a.c.s.VersionLoggerListener 97] - OS Version: 4.1.19-boot2docker
2017-01-10 15:20:03,780[main] [INFO ] [o.a.c.s.VersionLoggerListener 99] - Architecture: amd64
2017-01-10 15:20:03,781[main] [INFO ] [o.a.c.s.VersionLoggerListener 101] - Java Home: /opt/jdk1.8.0_102/jre
2017-01-10 15:20:03,787[main] [INFO ] [o.a.c.s.VersionLoggerListener 103] - JVM Version: 1.8.0_102-b14
2017-01-10 15:20:03,799[main] [INFO ] [o.a.c.s.VersionLoggerListener 105] - JVM Vendor: Oracle Corporation
2017-01-10 15:20:03,800[main] [INFO ] [o.a.c.s.VersionLoggerListener 107] - CATALINA_BASE: /home/user/che/ws-agent
2017-01-10 15:20:03,800[main] [INFO ] [o.a.c.s.VersionLoggerListener 109] - CATALINA_HOME: /home/user/che/ws-agent
2017-01-10 15:20:03,801[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.util.logging.config.file=/home/user/che/ws-agent/conf/logging.properties
2017-01-10 15:20:03,802[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
2017-01-10 15:20:03,804[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Xms256m
2017-01-10 15:20:03,804[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Xmx2048m
2017-01-10 15:20:03,804[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.security.egd=file:/dev/./urandom
2017-01-10 15:20:03,805[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.logs.dir=/home/user/che/ws-agent/logs
2017-01-10 15:20:03,805[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
2017-01-10 15:20:03,806[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
2017-01-10 15:20:03,806[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -agentlib:jdwp=transport=dt_socket,address=4403,server=y,suspend=n
2017-01-10 15:20:03,807[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote
2017-01-10 15:20:03,807[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote.ssl=false
2017-01-10 15:20:03,807[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
2017-01-10 15:20:03,808[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dche.local.conf.dir=/mnt/che/conf
2017-01-10 15:20:03,808[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.endorsed.dirs=/home/user/che/ws-agent/endorsed
2017-01-10 15:20:03,808[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcatalina.base=/home/user/che/ws-agent
2017-01-10 15:20:03,808[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Dcatalina.home=/home/user/che/ws-agent
2017-01-10 15:20:03,809[main] [INFO ] [o.a.c.s.VersionLoggerListener 115] - Command line argument: -Djava.io.tmpdir=/home/user/che/ws-agent/temp
2017-01-10 15:20:04,418[main] [INFO ] [o.a.c.http11.Http11NioProtocol 443] - Initializing ProtocolHandler ["http-nio-4401"]
2017-01-10 15:20:04,471[main] [INFO ] [o.a.t.util.net.NioSelectorPool 72] - Using a shared selector for servlet write/read
2017-01-10 15:20:04,477[main] [INFO ] [o.a.catalina.startup.Catalina 591] - Initialization processed in 1370 ms
2017-01-10 15:20:04,523[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
2017-01-10 15:20:04,558[main] [INFO ] [o.a.c.core.StandardService 435] - Starting service Catalina
2017-01-10 15:20:04,559[main] [INFO ] [o.a.c.core.StandardEngine 259] - Starting Servlet Engine: Apache Tomcat/8.0.38
2017-01-10 15:20:04,684[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 911] - Deploying web application archive /home/user/che/ws-agent/webapps/ROOT.war
2017-01-10 15:20:22,188[s polled Thread] [INFO ] [o.e.c.p.m.server.rmi.RmiClient 130] - Port/Name:16164/MavenRemoteServerImpla944723d

Tue Jan 10 15:20:26 UTC 2017 - [localhost-startStop-1] Product-specified preferences called before plugin is started
2017-01-10 15:20:27,433[ost-startStop-1] [INFO ] [o.a.c.startup.HostConfig 975] - Deployment of web application archive /home/user/che/ws-agent/webapps/ROOT.war has finished in 22,745 ms
2017-01-10 15:20:27,440[main] [INFO ] [o.a.c.http11.Http11NioProtocol 488] - Starting ProtocolHandler ["http-nio-4401"]
2017-01-10 15:20:27,469[main] [INFO ] [o.a.catalina.startup.Catalina 642] - Server startup in 22991 ms
2017-01-10 15:20:27,797[nio-4401-exec-5] [WARN ] [o.e.c.impl.ContainerResponse 93] - Client has aborted connection. Response writing omitted.
2017-01-10 15:20:27,798[nio-4401-exec-4] [WARN ] [o.e.c.impl.ContainerResponse 93] - Client has aborted connection. Response writing omitted.
2017-01-10 15:20:27,799[nio-4401-exec-3] [WARN ] [o.e.c.impl.ContainerResponse 93] - Client has aborted connection. Response writing omitted.
2017-01-10 15:20:27,807[nio-4401-exec-2] [WARN ] [o.e.c.impl.ContainerResponse 93] - Client has aborted connection. Response writing omitted.
2017-01-10 15:20:27,811[nio-4401-exec-1] [WARN ] [o.e.c.impl.ContainerResponse 93] - Client has aborted connection. Response writing omitted.
[STDERR] sudo: error in event loop: Operation not permitted
[STDERR] sudo: unexpected child termination condition: 0

@TylerJewell TylerJewell added the kind/question Questions that haven't been identified as being feature requests or bugs. label Jan 10, 2017
@TylerJewell
Copy link

Can you please share the syntax that you used to start Che, and then the output of the cli.log?

If you are running Che as a server to be accessed by remote clients, with the CLI you need to set CHE_HOST to an externally reacable IP address.

@ghost
Copy link

ghost commented Jan 11, 2017

@kallolghose what is your OS?

@kallolghose
Copy link
Author

@TylerJewell I am running che from CLI as che run, and have set CHE_HOST to the server IP.

@eivantsov OS is windows 10 Pro

@TylerJewell
Copy link

@eivantsov - are you thinking that this is a win 10 pro issue? I just checked all of the Windows systems that we are doing our testing on and they are Windows 10 home with Docker for Windows. I would be surprised if the OS is causing a problem for remote connects to a workspace agent.

@ghost
Copy link

ghost commented Jan 11, 2017

@kallolghose @TylerJewell here's what's happening. When you access a remote server, you need to make sure that your hyper-v VM is externally available since the browser will connect to it.

@kallolghose can you open browser dev console and share a screenshot with an error? I am sure there's a failed connection there.

@ghost
Copy link

ghost commented Jan 11, 2017

@TylerJewell a simple test to run:

  1. Run Che with CHE_HOST=eth0 on Windows 10
  2. Access it from another machine in the same network.

Unfortunately, I have just one laptop at the moment, but will test this scenario first thing tomorrow morning.

@ghost
Copy link

ghost commented Jan 13, 2017

@kallolghose @TylerJewell:

This can be fixed by uncommenting and setting CHE_DOCKER_IP_EXTERNAL=$IP where $IP is externally available IP of a Windows machine. So, edit and save che.env and restart Che.

@TylerJewell
Copy link

@eivantsov - I am making this a docs issue for now. It's not clear to me why this issue is happening. If this is related to the issues that were uncovered with 5.1.0-SNAPSHOT, then the docs issue is not needed and we can wait for nightly to get the fixes from the code refactoring. However, if this is a special scenario with a tagged version where this added parameter should be configured, then I'd like for us to discuss the situations where this may happen, and then get an appropriate clause in the networking / configuration part of the docs.

@kallolghose
Copy link
Author

@eivantsov I tried to run che by setting CHE_DOCKER_IP_EXTERNAL=$IP and also I have set CHE_HOST=eth0, but no luck !!

This is what i am getting on chrome console when accessing che from another PC over LAN

ss

@TylerJewell
Copy link

@kallolghose - Eugene's explanation was shorthand. I think he wants you to replace etho0 with the IP address on your system that is mapped to that interface, which I think is either localhost or 10.0.75.2.

@ghost
Copy link

ghost commented Jan 13, 2017

CHE_DOCKER_IP_EXTERNAL=10.x.x.x

Do you use this IP to access Che from another machine? If so, it should work. I my test I used my IPv4 IP.

@kallolghose
Copy link
Author

@TylerJewell @eivantsov I did use my IPv4 IP for the env variables but it did not work fo me, it gave me the same error as shared above.
Don't have access to LAN now, tomorrow morning will once again check all my configurations and shall re run the application.

@ghost
Copy link

ghost commented Jan 13, 2017

@kallolghose make sure the ephemeral port range isn't blocked.

@benoitf benoitf added area/doc Issues related to documentation and removed area/doc Issues related to documentation kind/docs labels Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/doc Issues related to documentation kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

3 participants