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

Set variable CHE_DOCKER_MACHINE_HOST_EXTERNAL on Docker for Mac and Windows #11

merged 1 commit into from Sep 9, 2016


Copy link

@l0rd l0rd commented Sep 9, 2016

This change is to set variable CHE_DOCKER_MACHINE_HOST_EXTERNAL to localhost when running on Docker for Mac or Docker for windows.

It's related to PR eclipse/che#2402 and fixes eclipse/che#1644

…or Docker for Windows

Signed-off-by: Mario Loriedo <>
Copy link

@TylerJewell TylerJewell commented Sep 9, 2016

lgtm +1

@TylerJewell TylerJewell self-assigned this Sep 9, 2016
@TylerJewell TylerJewell merged commit f082eff into eclipse:master Sep 9, 2016
1 check passed
Copy link

@darrinsimmons darrinsimmons commented Nov 16, 2016

Great job at CheConf16 today! Unfortunately, I still don't have Che fully working yet on my Mac.

I am trying to run Che on my Mac. I can install Che, create workspaces, and connect to them all fine from my Mac. When I then go to my PC, I can connect to Che, but am unable to connect to my workspaces. I have used this command line to install Che:

docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock -e CHE_IP= -e CHE_HOST_IP= -e CHE_DOCKER_MACHINE_HOST_EXTERNAL= eclipse/che:5.0.0-latest start

When I look at the network connections in Chrome on my PC, it is showing attempted connections to localhost instead of when I try and open a workspace. Would the change above account for this? Is Che supposed to work on the Mac for remote connections?

Here is what I have installed on my Mac:
Darrins-MacBook-Pro:dhs-cloud dsimmons$ docker version
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: darwin/amd64

Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: linux/amd64

To reproduce:

  1. Install Docker for Mac
  2. Run che-server command as above
  3. From separate machine, connect to
  4. Create workspace.
  5. Attempt to connect to workspace.

Copy link
Contributor Author

@l0rd l0rd commented Nov 16, 2016

Hey @darrinsimmons have you tried using Che CLI?

Copy link

@darrinsimmons darrinsimmons commented Nov 16, 2016

@l0rd, I have not. I am very much a newbie and therefore I am trying to follow the directions below and not stray too far from that recommended path:

That says that the docker launcher is the preferred method of running Eclipse Che. As you can see from the above, I've tried to pass in every environment variable that I can to make Eclipse Che on Mac work from remote machines. I even followed the recommendation from CheConf16 yesterday and added an alias to my lo0 (Which I would prefer to remove as it did not seem to help):

Darrins-MacBook-Pro:dhs-cloud dsimmons$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet netmask 0xffffff00
nd6 options=201<PERFORMNUD,DAD>

For now, I have gotten Eclipse Che working on a different CentOS box, including remote access to that box, so I can move forward.

Is Eclipse Che supposed to work using the docker launcher with remote access enabled, or is that a use case that is not supported yet? I've tried just about every combination within the context of using the docker launcher to no avail. If it is supposed to work, can I provide any additional info to help sort it out, or should I move this discussion into an issue elsewhere?

I love the work that the team is doing to make Che a dead-simple install and am happy to help in any way I can, if even by just being a "dumb user".

Copy link

@benoitf benoitf commented Nov 16, 2016

what happen if you do

$ git clone
$ cd che
$ ./ start


also I suggest to file a new issue as this pull request is not related to your problem

Copy link

@darrinsimmons darrinsimmons commented Nov 16, 2016

@benoitf, same result. (Great session at CheConf16 yesterday!)

I can access Che, start workspaces, and access workspaces from my Mac. I can access Che and start workspaces from PC, but I cannot access workspaces from my PC. In Chrome on my PC, it shows Che trying to access localhost for the wsagents.

Below is my following the suggestion above along with a docker inspect of che-server. Remember, I still have the lo0 alias to (Don't know if my PC will connect without it or not.) I like the idea of starting Che from a docker instance, so I believe I can just delete the ./che directory on my Mac. Interestingly, When I ran Che directly on my Mac, it found the dockerized Che workspace I had created previously. I've not found where the workspaces are kept on the host machine yet, although I've not looked very hard.

Darrins-MacBook-Pro:dhs-cloud dsimmons$ docker stop che-server
Darrins-MacBook-Pro:dhs-cloud dsimmons$ docker rm che-server
Darrins-MacBook-Pro:dhs-cloud dsimmons$ pwd
Darrins-MacBook-Pro:dhs-cloud dsimmons$ ls
autismpathfinder github gitlib learning report.tar scripts
Darrins-MacBook-Pro:dhs-cloud dsimmons$ git clone
Cloning into 'che'...
remote: Counting objects: 117448, done.
remote: Compressing objects: 100% (2672/2672), done.
remote: Total 117448 (delta 1248), reused 4 (delta 4), pack-reused 113814
Receiving objects: 100% (117448/117448), 34.67 MiB | 4.45 MiB/s, done.
Resolving deltas: 100% (43803/43803), done.
Checking connectivity... done.
Checking out files: 100% (8743/8743), done.
Darrins-MacBook-Pro:dhs-cloud dsimmons$ pwd
Darrins-MacBook-Pro:dhs-cloud dsimmons$ cd che
Darrins-MacBook-Pro:che dsimmons$ ls Chefile che.bat dashboard samples Dockerfile ide wsagent Dockerfile.centos Vagrantfile plugins wsmaster LICENSE assembly core pom.xml
Darrins-MacBook-Pro:che dsimmons$ ./ start
INFO: Pulling image curl:latest
INFO: Downloading cli-latest
WARNING: No kernel memory limit support
INFO: (che update): Pulling image eclipse/che-launcher:nightly
nightly: Pulling from eclipse/che-launcher
3690ec4760f9: Already exists
48187e2d8244: Already exists
349f1dce913e: Already exists
0a3cb3a429a2: Pull complete
990dfd0844f1: Pull complete
35ae041e8c01: Pull complete
Digest: sha256:7a2df5d3b5e265dc738d9b89282bd09ae3c66dc8a886c7bd2aee5d76a62d4e6e
Status: Downloaded newer image for eclipse/che-launcher:nightly

INFO: ECLIPSE CHE: Found image eclipse/che-server:5.0.0-latest
INFO: ECLIPSE CHE: Starting container...
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: Ver: 5.0.0-M7
INFO: ECLIPSE CHE: Use: http://localhost:8080
INFO: ECLIPSE CHE: API: http://localhost:8080/swagger
Darrins-MacBook-Pro:che dsimmons$
Darrins-MacBook-Pro:che dsimmons$ docker ps
388e2e61f631 eclipse-che/workspace8xgr1k2j0mz29znc_machinetczpfdrfkxjdkzn4_che_dev-machine "/bin/sh -c 'tail -f " 7 minutes ago Up 7 minutes>22/tcp,>3000/tcp,>4401/tcp,>4403/tcp,>4411/tcp,>5000/tcp,>9000/tcp workspace8xgr1k2j0mz29znc_machinetczpfdrfkxjdkzn4_che_dev-machine
aa8fee229380 eclipse/che-server:5.0.0-latest "/home/user/che/bin/d" 8 minutes ago Up 8 minutes 8000/tcp,>8080/tcp che-server
00539d7721f2 ubuntu "bash" 2 weeks ago Up 43 hours stoic_elion
Darrins-MacBook-Pro:che dsimmons$ docker inspect che-server
"Id": "aa8fee229380a85c6fc9be37ab2a592316bcb496529a4c54698121049f80d03b",
"Created": "2016-11-16T20:00:40.51389237Z",
"Path": "/home/user/che/bin/",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 7809,
"ExitCode": 0,
"Error": "",
"StartedAt": "2016-11-16T20:00:41.119725864Z",
"FinishedAt": "0001-01-01T00:00:00Z"
"Image": "sha256:6f30b0caa905da39b54f4d5ba6abecdeb16c2b70604ec2eed0a0851ced978970",
"ResolvConfPath": "/var/lib/docker/containers/aa8fee229380a85c6fc9be37ab2a592316bcb496529a4c54698121049f80d03b/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/aa8fee229380a85c6fc9be37ab2a592316bcb496529a4c54698121049f80d03b/hostname",
"HostsPath": "/var/lib/docker/containers/aa8fee229380a85c6fc9be37ab2a592316bcb496529a4c54698121049f80d03b/hosts",
"LogPath": "/var/lib/docker/containers/aa8fee229380a85c6fc9be37ab2a592316bcb496529a4c54698121049f80d03b/aa8fee229380a85c6fc9be37ab2a592316bcb496529a4c54698121049f80d03b-json.log",
"Name": "/che-server",
"RestartCount": 0,
"Driver": "aufs",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
"NetworkMode": "bridge",
"PortBindings": {
"8080/tcp": [
"HostIp": "",
"HostPort": "8080"
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
"GraphDriver": {
"Name": "aufs",
"Data": null
"Mounts": [
"Source": "/var/run/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "Z",
"RW": true,
"Propagation": "rprivate"
"Source": "/home/user/che",
"Destination": "/data",
"Mode": "Z",
"RW": true,
"Propagation": "rprivate"
"Config": {
"Hostname": "aa8fee229380",
"Domainname": "",
"User": "root",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8000/tcp": {},
"8080/tcp": {}
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"no_proxy=*.local, 169.254/16",
"Cmd": null,
"Image": "eclipse/che-server:5.0.0-latest",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"OnBuild": null,
"Labels": {}
"NetworkSettings": {
"Bridge": "",
"SandboxID": "97a3c83aa6bc90caa3163ed695b466f1fa59c07f0f4f3f41623be8a1c0b37357",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8000/tcp": null,
"8080/tcp": [
"HostIp": "",
"HostPort": "8080"
"SandboxKey": "/var/run/docker/netns/97a3c83aa6bc",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "4db171a2d480d5babb927916a2e8d4e9eb1b888c643e79904de0ff83668cb0d1",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:03",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "276937345dd820da004c489eae64113baef3990f9243622d83ad1d3c3cf093bf",
"EndpointID": "4db171a2d480d5babb927916a2e8d4e9eb1b888c643e79904de0ff83668cb0d1",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:03"
Darrins-MacBook-Pro:che dsimmons$

Copy link

@TylerJewell TylerJewell commented Nov 16, 2016

@darrinsimmons - Yeah, given the direction you are taking this issue, it would be helpful to open a new ticket, and document all of the steps that you are following to create the connectivity problem between Mac and Windows. I don't think this pull request is related to this particular problem.

Copy link

@darrinsimmons darrinsimmons commented Nov 16, 2016

@TylerJewell, thanks.

I have created the following issue:

Thanks for looking into this. Like yourself, I'm returning to coding (I hope) after a very long sabbatical. Your value proposition of Eclipse Che and Codenvy very much resonated with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants