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

Can't use Eclipse Che on macOS #12475

Closed
m0nhawk opened this issue Jan 21, 2019 · 17 comments
Closed

Can't use Eclipse Che on macOS #12475

m0nhawk opened this issue Jan 21, 2019 · 17 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@m0nhawk
Copy link

m0nhawk commented Jan 21, 2019

Description

The single-user Docker installation is broken.

Reproduction Steps

  1. Run Eclipse Che:
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd)/data:/data eclipse/che:latest start
  1. Create any stack.
  2. Create project - no available templates and:

screencapture-localhost-8080-dashboard-2019-01-21-01_26_00

WebSocket connection to 'ws://localhost:32833/wsagent?token=' failed: Error during WebSocket handshake: Unexpected response code: 403
o4k @ _app-0.js:18001

OS and version:
macOS 10.14.2
Docker 2.0.0.2
Che 6.16

@skabashnyuk
Copy link
Contributor

With chances, 99.99999% docker 2.x will not work on mac.
Try to use kubernetes https://che.eclipse.org/running-eclipse-che-on-kubernetes-using-docker-desktop-for-mac-5d972ed511e1 or minishift.

@skabashnyuk skabashnyuk added the kind/question Questions that haven't been identified as being feature requests or bugs. label Jan 21, 2019
@l0rd
Copy link
Contributor

l0rd commented Jan 21, 2019

With chances, 99.99999% docker 2.x will not work on mac.

@skabashnyuk what do you mean? Latest Che doesn't support latest Docker API (e.g. v1.39 distributed with Docker Desktop 2.0.1)?

@skabashnyuk
Copy link
Contributor

I think that starting from docker 1.18 che on mac is not working #10213
probably something with networking.

@l0rd
Copy link
Contributor

l0rd commented Jan 21, 2019

Issues do not seams related: in this case the workspace is started successfully whereas in #10213 the workspace cannot be started at all (cannot pull image) and there is a workaround for it.

Current issue looks related to #12463 instead. @skabashnyuk WDYT?

@skabashnyuk
Copy link
Contributor

@l0rd Maybe.
@m0nhawk can you show os Chrome developer console errors?

@m0nhawk
Copy link
Author

m0nhawk commented Jan 21, 2019

@skabashnyuk I can successfully create the workspace (any amount and for any stack).

In the logs (docker logs -f che) I don't see any errors, only one warning:

2019-01-21 16:39:28,497[Thread-11]        [WARN ] [o.e.c.i.e.m.s.ssh.KeysInjector 147]  - Unable to inject workspace workspaceidz27uwoh6okj58k public keys. Error: java.net.ConnectException: Connection refused (Connection refused)

The Chrome Dev console:

screen shot 2019-01-21 at 10 40 23 am

@m0nhawk
Copy link
Author

m0nhawk commented Jan 21, 2019

CONTAINER ID        IMAGE                                                        COMMAND                  CREATED             STATUS              PORTS                                                                                                                                                                    NAMES
accf0642dbb0        eclipse-che/workspaceidz27uwoh6okj58k_null_che_dev-machine   "/home/user/entrypoi…"   2 hours ago         Up 2 hours          22/tcp, 4403/tcp, 0.0.0.0:32845->4401/tcp, 0.0.0.0:32844->4411/tcp, 0.0.0.0:32843->4412/tcp, 0.0.0.0:32842->8000/tcp, 0.0.0.0:32841->8080/tcp, 0.0.0.0:32840->9876/tcp   workspaceidz27uwoh6okj58k_null_che_dev-machine
4a09d6660567        eclipse/che-server:6.16.0                                    "/entrypoint.sh"         2 hours ago         Up 2 hours          8000/tcp, 0.0.0.0:8080->8080/tcp                                                                                                                                         che

The port is forward and I have no firewall or anything in between.

@m0nhawk
Copy link
Author

m0nhawk commented Jan 21, 2019

Diagnostics:

REST Call on Workspace Agent
Unable to perform call on http://localhost:32846/api: Status -1, statusText:/null
Hint: Workspace Agent is running but browser is unable to connect to it. Please check CHE_HOST and CHE_DOCKER_IP_EXTERNAL in che.env and the firewall settings.

Websocket on Workspace Agent
No reply of websocket test after 5 seconds. Websocket is failing to connect to ws://localhost:32846/wsagent

@skabashnyuk
Copy link
Contributor

@m0nhawk this issue suppose to be fixed by this pr #12476

@sttyerase
Copy link

sttyerase commented Feb 20, 2019

@skabashnyuk @m0nhawk
I'm having what appears to be the same issue. I will be watching for the PR.
Error: Failed to run the workspace: "Server 'wsagent/http' in machine 'dev-machine' not available."

Mac Rules>>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9cf1189cffa3 eclipse/che-server:6.18.1 "/entrypoint.sh" 3 hours ago Up 3 hours 8000/tcp, 0.0.0.0:8080->8080/tcp che
Mac Rules>>
screen shot 2019-02-20 at 2 34 05 pm

@sttyerase
Copy link

I am not experiencing the issue on my Fedora server. The Che versions on both are the latest, 6.18.1.

@sriramnanduri
Copy link

sriramnanduri commented Feb 22, 2019

Experiencing the same issue on Mac with Che 6.18.1.
Docker version

screen shot 2019-02-22 at 1 43 29 am

Log:

2019-02-22 09:19:51,543[aceSharedPool-0] [INFO ] [o.e.c.a.w.s.WorkspaceRuntimes 398] - Workspace 'che:wksp-k7tg' with id 'workspace7aochsw84cj8d8th' started by user 'che'
2019-02-22 09:19:51,581[Thread-22] [WARN ] [o.e.c.i.e.m.s.ssh.KeysInjector 147] - Unable to inject workspace workspace7aochsw84cj8d8th public keys. Error: java.net.ConnectException: Connection refused (Connection refused)

@skabashnyuk
Copy link
Contributor

@sttyerase @sriramnanduri from what I can see your issue is not related to CORS

@qurben
Copy link
Contributor

qurben commented Feb 24, 2019

@skabashnyuk It seems to be related with #12476, before that CORS on wsagent was a bit more liberal.

When running the normal setup on Docker (the one described on the wiki and in this issue) and accessing Che via http://localhost:8080 the following happens:

In CheWsAgentCorsAllowedOriginsProvider the value of apiExternal is equal to http://10.0.75.2:8080/api (or whatever ip the container has on the Docker NAT). This sets allowedOrigins to http://10.0.75.2:8080. This causes the wsagent server to not respond with any CORS headers when a request is sent from http://localhost:8080 or http://127.0.0.1:8080 because the host does not match.

I am currently not well known enough with the code to propose a proper solution for this.

@skabashnyuk
Copy link
Contributor

Due to the end of life of Docker infrastructure more likely this bug would not be fixed. My recommendation to use K8S/OpenShift on OSX https://che.eclipse.org/running-eclipse-che-on-kubernetes-using-docker-desktop-for-mac-5d972ed511e1

@sttyerase
Copy link

sttyerase commented Feb 26, 2019

@skabashnyuk I do understand why you want to build Che to run on K8s and have robust cluster support. However, for the task I want to implement, a simple demonstration instance, this is like using a bulldozer when a shovel will do. This K8s instance has overwhelmed my MBP.

screen shot 2019-02-26 at 9 14 08 am

screen shot 2019-02-26 at 9 14 51 am

I do hope you will somehow find a way to continue Docker support for Che, if not now, then sometime in the future.

@sttyerase
Copy link

I finally found a version, 6.12.2, that will work with the latest Docker4Mac. It still has some bugs with Git keys, but should be useable for demonstration purposes. I'm "freezing" versions on both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

6 participants