user1753640
user1753640

Reputation: 375

Connect to GCP datalab results in error 255

I can create a datalab VM on the command line fine (e.g. datalab create datalabvm-5), and this will open a datalab session on port 8081. However, when I try to re-connect to the same vm using command "datalab connect datalabvm-5", I get the following error:

ssh: connect to host 35.188.103.167 port 22: Operation timed out

ERROR: (gcloud.compute.ssh) [/usr/local/bin/ssh] exited with return code [255]. Connection broken Attempting to reconnect...

Any ideas?

Upvotes: 1

Views: 731

Answers (2)

Leo Stefa
Leo Stefa

Reputation: 451

In my case this error was solved by specifying the zone in the datalab command line

When I created the datalab vm:

datalab create <my-vm-name> 

I selected: "[27] us-central1-a" as zone

Then, in order to connect again, I use following command:

datalab connect --zone us-central1-a <my-vm-name>

Without specifying the --zone parameter, I get the error you mentioned.

Upvotes: 1

Omar Jarjur
Omar Jarjur

Reputation: 1066

That's usually caused by the firewall rules in your project.

The datalab create command adds a firewall rule to your project named datalab-network-allow-ssh.

The first thing you should do is to check the current firewall rules (you can see them in the Cloud Console) to make sure that rule is still there.

Upvotes: 1

Related Questions