0
votes

I am trying to set up datalab from my chrome book using the following tutorial https://cloud.google.com/dataproc/docs/tutorials/dataproc-datalab. However when trying to set up an SSH tunnel using the following guidelines https://cloud.google.com/dataproc/docs/concepts/accessing/cluster-web-interfaces#create_an_ssh_tunnel I keep on receiving the following error.

ERROR: (gcloud.compute.ssh) Could not fetch resource: - Project 57800607318 is not found and cannot be used for API calls. If it is recently created, enable Compute Engine API by visiting https://console.developers.google .com/apis/api/compute.googleapis.com/overview?project=57800607318 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our sy stems and retry.

The error message would lead me to believe my "Compute Engine API" is not enabled. However, I have double checked and "Compute Engine API" is enabled.

Here is what I am entering into the cloud shell

gcloud compute ssh ${test-cluster-m} \
    --project=${datalab-test-229519} --zone=${us-west1-b}  -- \
    -4 -N -L ${8080}:${test-cluster-m}:${8080}
1

1 Answers

0
votes

The ${} is for accessing the local environment variable. You set them in the step before with:

export PROJECT=project;export HOSTNAME=hostname;export ZONE=zone;PORT=number

In this case would be:

export PROJECT=datalab-test-229519;export HOSTNAME=test-cluster-m;export ZONE=us-west1-b;PORT=8080

Either try this:

gcloud compute ssh test-cluster-m \
    --project datalab-test-229519 --zone us-west1-b  -- \
    -D 8080 -N

Or access the enviroment variables with:

gcloud compute ssh ${HOSTNAME} \
    --project=${PROJECT} --zone=${ZONE}  -- \
    -D ${PORT} -N

Also check the VM you are trying to access is running.