0

I cannot ssh to a particular vm instance, i have checked firewall and port 22 is allowed for receiving traffic. The command i used was datalab connect instance_name

This is the error :

Waiting for Datalab to be reachable at http://localhost:8081/ ssh: connect to host xx.xxx.xxx.xxx port 22: Connection timed out ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]. Connection broken

deppmish
  • 11
  • 4
  • I even tried to ssh trying different port like 2222 but failed ! – deppmish Jun 20 '17 at 14:50
  • Can you try to telnet to port 22 from your local machine to confirm that your firewall is ok? I tried to telnet to the IP/port 22 you provided but the telnet failed. Also, please remove your IP address for security reasons. – Anthonios Partheniou Jun 20 '17 at 15:20
  • @Anthonios Partheniou I can connect to all other instances, just not this particular one. – deppmish Jun 20 '17 at 15:45

1 Answers1

1

Here is what I would try to debug the issue:

  1. Try connecting to the instance using the ssh button in the Cloud Console.

  2. If that does not work, then the issue is probably something about the instance itself. In this case, the next thing to do would be to check the serial port output of the instance and the StackDriver logs for it to see if either of them includes any error messages.

  3. If the ssh button does work, then the issue is something to do with the connection from gcloud to the instance. In this case you want to find where along the path the issue is happening, so the next thing I would try is running the datalab connect command from another VM in that same project.

Omar Jarjur
  • 1,046
  • 5
  • 5
  • ssh and datalab connect does not work. i get the same error. Stackdriver logs is difficult to understand. I cannot obviously also copy the files from this instance to another one. i am trying to clone to retrieve the notebooks. Any other way to retrieve notebooks ?? – deppmish Jun 21 '17 at 09:16
  • See https://cloud.google.com/datalab/docs/how-to/working-with-notebooks#cloud_datalab_backup for how to retrieve backups of the notebooks from the VM. (They are backed up to Cloud Storage by default.) – Chris Meyers Jun 21 '17 at 16:47