question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Che on AWS EC2 to allow remote browser clients through SSH tunnel

See original GitHub issue

I have set up Che on EC2 and can fully work on it through a firefox running locally on that host (using VNC for remote viewing). But I am not able to do the same if I access it on my laptop’s browser:

The security settings for EC2 are as follows:
Type            Protocol        Port Range      Source
Custom TCP Rule     TCP         32768 - 65535       73.XXX.XXX.XX/32
SSH         TCP         22          73.XXX.XXX.XX/32

When setting up the SSH tunnel, I forward the following way: 8080/localhost/8080

When starting Che on the remote, I issue the following: ~/Applications/eclipse-che-4.2.0/bin/che.sh run --remote:localhost

From my laptop browser’s localhost:8080, I can view the dashboard and stop running workspaces. I can also start workspaces, even though I see the following log: https://gist.github.com/GuSuku/8e44a3c467a3414ec9be31940cd17f83 To wit, in spite of the warnings at the end (Client has aborted connection. Response writing omitted.), the workspace does get started.

But, from my laptop browser client, when opening a running workspace in IDE, I get the following popup:

window.IDE.eventHandlers.initializationFailed@http://localhost:8080/ide/wksp-65qm?uid=612032:39:27
Wdb@_app-0.js:1782:21
ieb@_app-0.js:1787:380
_.Un@_app-0.js:4290:317
gS/<@_app-0.js:1316:276 

And the IDE is stuck at LOADING: Starting workspace agent

I am sure it has got something to do with ports, but not sure which port and what I should do.

= More info: =

  • When I do docker ps, I get the following:
CONTAINER ID        IMAGE                                                        COMMAND                  CREATED             STATUS              PORTS                                                                                                                                                                         NAMES
9ab79d815907        eclipse-che/che_workspaceu3p1r5ppkt1xb4ba_ws-machine_w5z4n   "/bin/sh -c 'sudo /us"   9 minutes ago       Up 9 minutes        0.0.0.0:32795->22/tcp, 0.0.0.0:32794->4401/tcp, 0.0.0.0:32793->4403/tcp, 0.0.0.0:32792->4411/tcp, 0.0.0.0:32791->8000/tcp, 0.0.0.0:32790->8080/tcp, 0.0.0.0:32789->9876/tcp   che_workspaceu3p1r5ppkt1xb4ba_ws-machine_w5z4n
  • For the command - docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq) - I get the following: /che_workspaceu3p1r5ppkt1xb4ba_ws-machine_w5z4n - 172.17.0.2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:46 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
james10174commented, Jun 6, 2016

@GuSuku Use my guide. I got it to work. Do the following in addition to guide.

image image image

image

image

1reaction
james10174commented, Jun 6, 2016

@GuSuku I think the All traffic is over ruled by the custom TCP rules. Remove All traffic. Also change source to anywhere which will be 0.0.0.0. This allows external ip address to use it. Should look like the following when you are done.

image

You might be able to change port 8080 from anywhere to localhost or 127.0.0.1 once you get the above working. This would be a good idea to do actually because your che server wouldn’t be exposed to the internet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open a tunnel and use browser-based SSH to access remote ...
This tutorial shows how to open a tunnel using the quick setup method and use the browser-based SSH to connect to the remote...
Read more >
Use an SSH tunnel through AWS Systems Manager to access ...
Session Manager tunnels real SSH connections, allowing you to tunnel to another resource within your virtual private cloud (VPC) directly from ...
Read more >
Set up an SSH tunnel to the primary node using local port ...
Set up an SSH tunnel to the primary node using local port forwarding with OpenSSH ... Type the following command to open an...
Read more >
Set up an SSH tunnel to the primary node using dynamic port ...
Set up an SSH tunnel to the primary node using dynamic port forwarding with OpenSSH ... Type the following command to open an...
Read more >
Use EC2 Instance Connect to provide secure SSH access to ...
Overview of how EC2 Instance Connect works · A browser-based client accessible via the AWS Management Console. · Your own key and SSH...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found