I had a project deployment to GAE using cloud build which was working fine, But I deleted the project by mistake. But after the restore, the deployment is failing with
ERROR: (gcloud.app.deploy) Error Response: [4] Timed out waiting for the app infrastructure to become healthy.
I see this in the cloud build logs: even when the Cloud build service account has the App Engine Admin Permissions
WARNING: Unable to verify that the Appengine Flexible API is enabled for project []. You may not have permission to list enabled services on this project. If it is not enabled, this may cause problems in running your deployment. Please ask the project owner to ensure that the Appengine Flexible API has been enabled and that this account has permission to list enabled APIs.
Also, the permissions for the account owner has changed from : 1350/1578 to 1266/1578. How can I fix that?
I have tried to replicate the issue you're experiencing by creating a new project and deploying a simple HelloWorld app in GAE Flexible environment.
I have deleted my project and then restored it, and, after that, I was unable to deploy the app again. The issue was solved once I made sure my Google App Engine Flexible Environment API is enabled and linked my Billing Account again (as it gets removed when you delete the project).
EDIT:
After further research, I found this page in the GCP issue tracker.
Based on the information from that page, the error you are experiencing can occur for various reasons. It can be related to quotas (e.g. CPU cores, memory, public IP addresses) or, sometimes, the region where you are trying to deploy.
As it was confirmed by the engineer, trying to re-deploy, or to deploy in a different region often resolves the issue. However, if the issue persists and you have a support package, I'd recommend you to contact GCP support as the issue is too broad to troubleshoot it here and may require a project inspection.
Related
I'm using the gcloud SDK to try to deploy a Dockerfile and app.yaml to app engine. My App Engine service account has Project Editor and Storage Admin and SQL Client roles, and the Cloud Build, App Engine, and App Engine Flexible APIs are all enabled. Nonetheless, I keep encountering this error with gcloud beta:
ERROR: (gcloud.beta.app.deploy) Error Response: [7] Unable to write to staging bucket staging.
<project name>.appspot.com. Please grant access to the App Engine service account on your project
by visiting https://console.developers.google.com/storage/browser?project=<project name>
and this (less clear) error with vanilla gcloud:
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve source
In a different sandbox/dev project, I didn't have this issue, but in this production project, that hasn't been the case. Adding the SAs manually makes no difference. And weirdly, the deploy is writing the files to the staging bucket, so I don't trust this error. Where it seems to be failing is the step immediately after that--maybe App Engine Flexible service account agent wants to access them; maybe the Dockerfile needs to be passed onward to Cloud Build SA; but in any case, I have tried every combination of granting bucket access to both App Engine and Cloud Build SAs and their agents as well, and it hasn't worked.
My user account has app engine deployer role assigned to it, and even impersonating the App Engine account with its editor role didn't make a difference. Cloud Build has App Deployer role as well.
The error of the Vanilla GCloud indicates that your service account is likely missing some permissions. Try disabling and re-enabling the Cloud Build API in your project so a new service account is created.
This ensures that Cloud Build has permission to start builds.
Also, make sure to wait a few minutes before trying to deploy (like 10 minutes or so), so that the permissions can be propagated to all systems.
I tried to deploy new version to app engine. But it keeps saying
vm_check_disk_space.sh and health check logs.
and on web browser it gives me 502 error saying
Error: Server Error
The server encountered a temporary error and could not complete your
request.
Please try again in 30 seconds.
I have tried 4 times trying to deploy but never worked.
I think you can reproduce this by deploying any project to app engine.
I am using Google Cloud SDK 157.0.0
and
tried to deploy service with java and nodejs environment
I received many weird errors like this while deploying months ago with both maven and gradle. Various strange things with app.yaml can cause this as well. Even the example projects provided from google contained strange bugs like this when deployed.
Try one of the test projects that google provides: Google NodeJS bookshelf app
(Hopefully this project has been fixed by now and will deploy correctly!!)
Also, it's possible that an old version can prevent your new code from deploying. Go to your console, and delete/stop all running versions of the service. (I have had issues with old versions becoming stuck, which causes issues with the new deployment becoming the default service).
My team and I are working on the Trendy Lights Tutorial.
We have set up all the files and also have converted the .p12 key to .pem key but failed to run the app on the Google Cloud Platform and constantly got the error message saying:
You do not have permission to access project [...] and service
"cloudbuilt.googleapis.com" is not for consumer..."
We have already whitelisted our service account for the use of Earth Engine. Does anyone know what the problem might be?
Thank you so much!
I see that you are attempting to deploy your application to the App Engine Flexible Environment.
The Flexible environment differs from the Standard environment in that it gives you more control over the individual instances that are running your deployed application. It does this by hosting your application within Docker on Compute Engine virtual machines.
Therefore, you will need to enable the Compute Engine API for your project so that the GCloud tool can start new Compute Engine virtual machines when you deploy your application.
Note: Since the Flexible environment uses Compute Engine resources, you will also need to enable billing for your project.
If after performing the above you still experience the 'cloudbuild.googleapis.com' error, I ask that you run gcloud components update, then ensure that the value of account seen in the output of the command gcloud info has Owner or Editor permissions in your project.
If it still persists after all of the above, you should then open a Public Issue Tracker to inform our backend team of the issue.
is it possible to deploy to the same appengine project from multiple users? Like if I add another user to have access to my appengine project how can the other user also deploy to my appengine? Is this possible?
Yes, multiple users can deploy to the same AppEngine app id. Just give them each permission from the cloud console.
At that point, every authorized developer is the same and can deploy in the normal fashion. Just keep in mind that users can/will overwrite each other's deploys if they push the same version identifier.
The most recent deploy of the same version wins and overwrites the earlier deploy. So, make sure your team workflow accommodates this.
Having created a number of Google App Engine applications and later enabled billing via the App Engine interface in the past, I am now unable to do this for a new application since it appears that new App Engine applications now must be administered through the Google Developer Console.
Within the Google App Engine interface (appengine.google.com), it informs me:
Billing for this application is managed from the Google Cloud Console.
and then further directs:
Create a Google Cloud project as well as a Google Cloud Storage bucket and a new style service account for this application
however every time this is attempted it reports:
An error occurred when creating the project. Please retry.
If I instead access the Google Developer Console (console.developers.google.com), I can see that a new project has been created (presumably from the above action) for this application however if I try to open it I receive the message "You do not have sufficient permissions to view this page." and yet I am the admin account and presumably created this project. This leaves me unable to administer or enable billing for the application. My other applications are all listed in this interface and I can freely open them and see their details, it is just the new project.
Is it possible to either correct the permissions for this application so it can be accessed from the Google Developer Console or can I instead have the billing for this application controlled and enabled from the Google App Engine interface?
I am happy to privately provide the Google application-id if this is required for further diagnosis.
Any help would be much appreciated.
Thanks in advance
Further Note: I have come across this which could be related, https://code.google.com/p/googleappengine/issues/detail?id=9602, which indicates there has been problems in the past with this facility but Google have marked this issue closed.