3

Trying to access Google Cloud Datalab server with: docker run -it -p "127.0.0.1:8081:8080" -v "${HOME}:/content" -e "GATEWAY_VM=mltensorflow-1470671201129/us-east1-b/vm-instance-name" gcr.io/cloud-datalab/datalab:local

as per Run Cloud Datalab on Google Cloud Platform

It fails with: ERROR: (gcloud.compute.ssh) Could not SSH to the instance. It is possible that your SSH key has not propagated to the instance yet. Try running this command again. If you still cannot connect, verify that the firewall and instance are set to accept ssh traffic.

I am on a Windows 10 client. Repeated installation now produces this error: channel 2: open failed: connect failed: Connection refused Failed to set up the SSH tunnel to the VM vm-instance-name

Instance is accessible via other means, for example: gcloud compute --project "project_name" ssh --zone "us-west1-a" "ins-name"

  • Just a quick check. Did you replace `vm-instance-name` with the vm instance you created? The reason I ask is because `vm-instance-name` does not match the instance name used in `gcloud compute ...` – Anthonios Partheniou Aug 15 '16 at 14:23
  • Good catch, Anthonios. Unfortunately, that is not the cause ( I listed generic gcloud statement - real arguments are ok and match actual vm instance name ). – Ranko Mosic Aug 15 '16 at 15:07
  • I think something is missing in Datalab docs - they just changed way you access it over the weekend. It might be something along the lines of: gloud docker – Ranko Mosic Aug 15 '16 at 15:09
  • I ran through the docs and I could connect to a gateway server in GCE. Note: I received the same error that you mention here (`Failed to setup the SSH tunnel`). After 30 seconds, I tried `docker run it ...` again and didn't get the error. – Anthonios Partheniou Aug 15 '16 at 16:09
  • Repeated execution didn't work for me. Are you on Windows ? – Ranko Mosic Aug 16 '16 at 08:12
  • 1
    Unfortunately, I'm not on Windows. Docker doesn't work in my windows virtual machine. From https://forums.docker.com/t/cant-use-docker-inside-virtual-machine-with-windows-server-2016/19739 , "Docker for Windows requires hyper-v and virtualization extensions. Without nested virtualization (not available in VirtualBox), Docker for Windows can't install and work." – Anthonios Partheniou Aug 16 '16 at 16:49
  • I got passed that point - it is simple to enable Hyper-V and Docker works on Windows. It is just that geniuses from GOOG Dloud Datalab didn't produce working docker container on Windows. So I switched to Ubuntu as per below, got passed docker run command, but am now having a problem with empty notebook page. – Ranko Mosic Aug 18 '16 at 08:46
  • I'm experencing the same issue. Could it be an authentication problem? I get the following message warning after the authentication step.'WARNING: `gcloud auth login` will stop writing application default credentials in a future release. See: https://developers.google.com/identity/protocols/application-default-credentials#toolcloudsdk for more information.' – Peter Coghill Aug 18 '16 at 08:52
  • This is all quite annoying. GOOG had working Datalab, and now switched to junk. How are we supposed to trust GOOG public cloud if they pull the rug from under us ? – Ranko Mosic Aug 18 '16 at 10:18
  • @RankoMosic `I got passed that point` -> The issue I have is specific to running Docker for Windows inside of a Windows virtual machine using Virtualbox which doesn't support nested virtualization. I don't believe there is a solution for that. Docker for Windows works when you have a Windows host. Can you confirm you are using a windows host? I wasn't able to reproduce the issue on Ubuntu. I want to make sure that we are both using the same docker image. Can you run `docker pull gcr.io/cloud-datalab/datalab:local` ? – Anthonios Partheniou Aug 18 '16 at 12:27
  • @RankoMosic Can you create an issue [here](https://github.com/googledatalab/datalab/issues/new) with the full console output? My configuration works great in Ubuntu, and I want to help, but I need more information. I appreciate your patience while we work through the issue. – Anthonios Partheniou Aug 18 '16 at 12:30
  • @PeterCoghill `I'm experencing the same issue. ` -> Can you create an issue [here](http://github.com/googledatalab/datalab/issues/new) with the full console output? Please describe your issue in as much detail as possible. – Anthonios Partheniou Aug 18 '16 at 12:33
  • I created an issue on github. – Ranko Mosic Aug 20 '16 at 10:37
  • I've submitted a [pull request](https://github.com/googledatalab/datalab/pull/951) which appears to resolve the 'blank page' issue. In the meantime, there is a temporary workaround documented in the comments in [Datalab Github Issue #950](https://github.com/googledatalab/datalab/issues/950). – Anthonios Partheniou Aug 21 '16 at 15:03

2 Answers2

2

The command docker run ... has an argument that doesn't work on Windows AFAIK. But the strange thing is that I would expect a very different error and in fact managed to get an error due to ${HOME}.

Here is the command I ran and it worked well - after substituting the value for HOME (you will need to replace [proj-id] below.

docker run -it -p "8081:8080" -v "/C/Users/dinesh/Documents/:/content"    -e "GATEWAY_VM=[proj-id]/us-central1-f/datalab"  gcr.io/cloud-datalab/datalab:local

Not sure if this will work for you but something worth trying in case substitution was a problem. (I am assuming that the VM was created with datalab-gateway.yaml without any errors.)

Thanks.

Dinesh Kulkarni

PM, Datalab & Cloud ML

Dinesh
  • 421
  • 2
  • 7
  • Hardcoding path as per above didn't work ( path related error was popping out initially, then disappeared after a while; that's why I didn't bother hardcoding it ). – Ranko Mosic Aug 16 '16 at 08:15
  • Repeated the whole process, now on Ubuntu 16.04. Got passed the above problem point. Ran into another problem: Browser is not showing any Python notebooks. – Ranko Mosic Aug 16 '16 at 15:00
  • Please could you provide more information to help troubleshoot? What do you see in the browser? – Anthonios Partheniou Aug 16 '16 at 16:51
  • When I point to localhost:8081 URL changes to localhost:8081/tree/datalab and blank screen is displayed. No notebooks are loaded. ( I did get past "Allow" button ). – Ranko Mosic Aug 17 '16 at 09:34
  • This could be why - found this line in docker run ... output: {"name":"app","hostname":"326a7fabf546","pid":181,"level":50,"err":{"message":"timeout","name":"Error","stack":"Error: timeout\n at timeoutFunc (/datalab/web/node_modules/tcp-port-used/index.js:192:25)\n at Timer.listOnTimeout (timers.js:92:15)"},"msg":"Failed to start Jupyter server for user anonymous.","time":"2016-08-17T09:25:32.252Z","v":0} – Ranko Mosic Aug 17 '16 at 10:16
  • @RankoMosic One possibility is that a local firewall is blocking the connection. Did you by any chance make firewall configurations in ubuntu (such as `iptables`), which could be blocking local connections (127.0.0.1)? – Anthonios Partheniou Aug 18 '16 at 12:48
  • iptables is not running – Ranko Mosic Aug 20 '16 at 10:37
1

The problem with official instructions Run Cloud Datalab on Google Cloud Platform, is that provided command to create the gateway VM does not work correctly on Windows.

Replace --metadata "google-container-manifest=$(cat datalab-gateway.yaml)" with --metadata-from-file google-container-manifest=datalab-gateway.yaml and it will create VM with datalab-gateway.yaml without any errors. You can login to your new instance and run sudo docker ps to double check if container is running.

Afterwards you can continue with next step (docker run...), just substitute ${HOME} with /C/Users/<your path> as Dinesh described.

Dorota
  • 11
  • 1