Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: permission denied on resource project when launching Dataproc cluster

I was successfully able to launch a dataproc cluster by manually creating one via gcloud dataproc clusters create.... However, when I try to launch one through a script (that automatically provisions and stops clusters), it says ERROR: (gcloud.dataproc.clusters.create) PERMISSION_DENIED: Permission denied on resource project hail-test-project (#0). I don't understand why, because the script uses the same command.

like image 462
claudiadast Avatar asked Sep 26 '17 19:09

claudiadast


2 Answers

One possible reason is you are using a wrong project. You should use your project id, not your project name. Sometimes they are the same, sometimes not. I just met this problem and I think this could be the possible reason, and it will be useful for other people that find this question in the future.

like image 183
Tc Zhong Avatar answered Sep 21 '22 01:09

Tc Zhong


It sounds like the script might be running as a different user than when you run gcloud dataproc clusters create... manually. gcloud uses your home directory for configuration, so the body of your script will be dependent on the user it runs as.

like image 29
Axel Magnuson Avatar answered Sep 19 '22 01:09

Axel Magnuson