-
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
Che server should connect to ws-agent on internal URL #2030
Comments
@l0rd can you reproduce it? |
This has been fixed in #1983 but codenvy/che-launcher hasn't been updated. |
@riuvshin can you please check? |
@l0rd I tried it with nightly Fail pinging ws agent. Workspace ID:workspace94c7eunv699lec0u. Url:http://172.19.20.16:32773/wsagent/ext/. Timestamp:{} Server cannot reach agent, disabling ufw solves the problem. Are we OK with this? |
We had an issue with the firewall on centos: the launcher could not verify if the server was up or not. So that's a different issue. Can you please copy/paste the output of: |
|
@eivantsov you don't have the latest nighlty of the launcher. Can you try to: docker pull codenvy/che-launcher:nightly && docker pull codenvy/che-server:nightly and test to see if you can reproduce the bug? |
That likely will fail as our ci systems have been down for a couple days due to weather. We will need to help Eugene to build the nightly locally for testing. |
I updated all nightly images. The same result when ufw is on. |
@TylerJewell is right you may not have latest fix (nighlty are 3 days old). You can create the images from the root of the repo:
|
If this fails can you confirm that:
This looks really similar to #1924 where che-launcher failed to ping wsmaster. Here is wsmaster fails to connect to wsagent but the reason is the same: the firewall is blocking containers to host connections. |
@l0rd - these are some great tips. I am going to add them into a diagnostics section for people who are setting up Che the first time. When you run the last one, I get the IP address from doing a docker inspect on the workspace container that was created. I get the internal IP address. HOwever, the output doesn't look suitable. Is this what you would expect? I have a valid and running workspace.
|
@TylerJewell you are missing the trailing slash in your path On Thursday, 4 August 2016, Tyler Jewell notifications@github.com wrote:
|
@eivantsov Please provide status label. |
A couple of things about this issue:
|
@eivantsov - I believe this issue is no longer active and can be resolved due to recent changes made with the launcher. Can you verify and then we will close issue permanently? |
@TylerJewell I think that the issue is still there. Even if we added some checks and provided a workaround (disable the firewall) we could still fix it and let users use both Che and their firewall. What do you think? |
@l0rd - not quite following your suggestion here. I was unable to reproduce it this evening - and we have the connectivity tests which can help diagnose this. Can you be more specific on what you are thinking? |
@TylerJewell i have updated che-launcher and che-server images. The problem is still there. If firewall is on, Che server cannot reach workspace agent. |
Can you paste the output of 'che.sh --networking'. Please the script from master. |
@TylerJewell currently Che server uses the external IP to contact wsagent (http://198.75..57.22:32773/ in the diagram). Every HTTP request does the roundrip to and from As a result, if a firewall blocks requests to Che server could instead connect to wsagent using the internal URL (http://172.17.0.3:4401/). This would be a security improvement too and would help when Che will run in swarm cluster. But needs some coding, configuration is not enough. That's why I suggest to keep this issue open. |
The summary and graphic makes it really clear. Thanks, @l0rd. |
@amisevsk from RedHat is going working on that |
In case others come here with the same issue, I was finally able to run Eclipse Che on Ubuntu 16.04 with an active ufw firewall blocking external access. Can't claim this is the best or correct way, just glad to get it working. Running che with the firewall active would fail to at "Initializing workspace" with the "Could not start workspace ... Timeout reached" error. Running che info --networking command showed:
The solution was to allow intra-docker communication while blocking docker inserted rules to open ports to the public internet.This command allows intra-docker container communication To access the server remotely, I am using a ssh SOCKS proxy with a session of chrome specifically launched to use that proxy: Hope this helps someone! |
That is amazing, @JasonB42 - thank you for the great contribution. |
@garagatyi That would be the preferred solution going forward. Is @lord's code available now? Did I overlook how to set that up? |
@JasonB42 @garagatyi I'm not sure that #2402 will help here. We can try to set two different IPs using env variables or che.properties:
but I'm afraid that some IP tables rule will reject packets coming from the che-server directed to |
What's the status of this issue? Is it being worked on by anyone? |
Yes, there is a PR on this - ongoing development with Red Hat and Codenvy - multiple people on this. It will be solved (hopefully) in time for GA. |
Add classes to support refactoring of DockerInstanceRuntimeInfo. Adds interface ServerEvaluationStrategyProvider, which provides objects implementing ServerEvaluationStrategy, an interface which supports getting servers from ContainerInfo json via port protocol. Additionally adds default ServerEvaluationStrategy which represents the current getServers() functionality. Additionally, DefaultServerEvaluationStrategy supports functionality required by issue eclipse-che#2030 (Che server should connect to ws-agent on internal URL) via property che.docker.ip.use_internal_address Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Refactor DockerInstanceRuntimeInfo#getServers() (#2030)
Refactor DockerInstanceRuntimeInfo#getServers() (eclipse-che#2030)
Cannot run Che in Dockert
Expected behavior:
Che starts
Observed behavior:
Che version: [Enter Che version here]
OS and version: Ubuntu 14.04
Docker version: 1.11.2
The text was updated successfully, but these errors were encountered: