For the challenge lab, I choose an existing project under admin account (trial). I created the bucket, and vm with metadata/startup script, I noticed the load from stress in console. I didn’t see the machine-*-finished.txt in bucket after waiting a while, To investigate I sshed into the vm, changed to su, went to / folder and saw the file. From their I manually issued the gsutil cp command and got this error:
root@gce-challenge-lab:/# gsutil cp machine-gce-challenge-lab-finished.txt gs://challenge-lab-gce/
Copying file://machine-gce-challenge-lab-finished.txt [Content-Type=text/plain]…
AccessDeniedException: 403 The project to be billed is associated with a closed billing account.
I verified the billing account associated with the project, it was good and active. From console/UI I was able to upload a file to the same bucket with no error. Stack driver logs also didn’t show all the logs, especially related to stress. I couldn’t figure what is the source of the error.
I deleted the project, created a new project associated with SAME billing account and repeated the process. All worked this time.
Hello, Sankar! Thanks for sharing what happened to you and how you got things working. Looks like you did some good debugging, there! 👍
I don’t believe I’ve come across this particular behaviour, myself, and my searching seemed to indicate that it might require Google’s Billing Support people to unstick it if your workaround of recreating the project doesn’t work. I wonder (pure speculation) whether maybe the account was in some sort of a billing validation status for enough time for another part of the system to get and remember that error message. If that were the case, maybe it would go away on its own after a day or so? But your quicker approach seems much better.
Now, one other thing I notice, though, is that you weren’t seeing the Stackdriver Logs for
stress–and presumably the rest of the startup script–so it’s possible there was some issue with the scopes set on the instance and maybe the "closed billing account" message is a red herring. Not sure, but something to consider.
I ran in to a similar issue when doing the challenge from the command line. I created my new project on the command line. When I tried to list out the zones I got an error saying Billing was not enable on this project. I went in to the Console > Billing > My project and sure enough there was my project with it disabled. When I tried to enable it I got a message that I hit my quota ( even though I still have 7 project available, or so it said). Through the Console I went back through and cleaned up previous Projects. Once I did that I was able to enable the billing on my new project.
I just had the same problem. I have to link billing account –
l:~ (cg-gce-lab-cli))$ gsutil mb -c regional -l us-west1 gs://challenge-lab-bucket
AccessDeniedException: 403 The project to be billed is associated with an absent billing account.
To get billing account –
gcloud beta billing accounts list
To add project into billing account –
gcloud beta billing projects link
that fixed issue
I also ran into a billing error that…if I remember…said something about maxxing out when I replicated it in the console. I deleted some projects then used beta billing to link my new project to billing. notes are in this other discussion: https://acloud.guru/forums/gcp-certified-associate-cloud-engineer/discussion/-LhLcpSz4YIdb7R-NiMV/gcs_&_gcs_permissions_model_ch