Google Managed VMs error while deploying - google-app-engine

We just moved to VMs and while deploying we are having issues in Java Environment. The error is
Error Create Config Bucket failed. during VmCreateConfigBucket.
Then tried all the steps in the Google Page - deploying to Production. Nothing seems to work. (https://cloud.google.com/appengine/docs/managed-vms/sdk)
Then We manually tried to create the buckets in Google Console. Retried our deployement but got the same error.
DETAILED Error message in the LOG :: Unable to update:
java.lang.RuntimeException: Fatal problem encountered during deployment. Please refer to the logs for more information.
at com.google.appengine.tools.admin.AppVersionUpload.isServing(AppVersionUpload.java:900)
at com.google.appengine.tools.admin.AppVersionUpload.access$100(AppVersionUpload.java:41)
at com.google.appengine.tools.admin.AppVersionUpload$2.call(AppVersionUpload.java:779)
at com.google.appengine.tools.admin.AppVersionUpload$2.call(AppVersionUpload.java:776)
at com.google.appengine.tools.admin.AppVersionUpload.retryWithBackoff(AppVersionUpload.java:1029)
at com.google.appengine.tools.admin.AppVersionUpload.commit(AppVersionUpload.java:776)

Removing the image did the trick for me.
docker rmi <image>
Then:
gcloud preview app deploy --version=my_version my_dir/app.yaml

Related

Gcloud app deploy failing with error response [5] - cannot get cloud region in global job

I'm hosting my angular website with app engine, and have build triggers set up to automatically deploy my website when I push to master on my github repo.
Up until last night, this all worked fine. I've changed nothing in either my app.yaml or my cloudbuild.yaml files, but now my builds are failing on the "gcloud app deploy" step with the following error message:
ERROR: (gcloud.app.deploy) Error Response: [5] Cannot get cloud region in global job.
I even reran some old builds that had previously passed and they now fail. Can't really find anything online for this so I'm a bit lost as to what to do really. Any help would be appreciated, thanks!
Edit: This issue seems to have been resolved now. I reran some of the failing builds again without changing anything and they worked. I can only assume it was an internal GCP issue.

Google App Engine - Failed to generate quickstart-web.xml

I have java8 project in Google App Engine . I already deployed one version of it. Now I made some changes and trying to redeploy with same command as before:
mvn package appengine:deploy
But it always fails with message:
Failed to generate quickstart-web.xml
Any idea what to do? I don't know what happened that it suddenly stopped working. Only thing I thought it could be was that I generated indexes for datastore inside Google Shell with .yaml file (java-11 version), so it somehow messed up, but I am not really sure.
The log looks like this
com.google.appengine.tools.admin.AdminException: Unable to stage app: Failed to generate quickstart-web.xml.
at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:543)
at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:492)
at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:2508)
at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:363)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:211)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:118)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:114)
Caused by: java.lang.IllegalStateException: Failed to generate quickstart-web.xml.
at com.google.appengine.tools.admin.Application.createQuickstartWebXml(Application.java:1732)
at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:1002)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:862)
at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:539)
... 6 more
To migrate from Java8 project to Java11 in App Engine Standard, you can follow the next Official Documentation.

I'm getting an error: pathspec 'branch-name' did not match any file(s) known to git

I'm currently deploying a nextJS site to github pages but was getting an error upon running npm run deploy. I'm suspecting it is a git checkout error but not sure where to start investigating.
Here's a screenshot of the error:
Am I missing something?
Any help would be much appreciated.
This is fixed. I've used ZEIT Now to deploy my application instead. See:
https://nextjs.org/learn/basics/deploying-a-nextjs-app/deploying-to-zeit-now
Then, assigned my domain name to my ZEIT Now deployment. For my code to still be visible in Github, I've just pushed my NextJS site to the repo.

Unable to deploy app engine app using Eclipse plugin

My user has "App Engine Deployer" & "App Engine Admin" permission. When I try to deploy the app using Eclipse, I get following error -
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=xxxxxxxxxx&version=9&
403 Forbidden
You do not have permission to modify this app (app_id=u's~xxxxxxxxxx').
Though when I check cloud control panel, I see that the app is deployed. Why this error?
Here is full deployment console detail:
Preparing to deploy:
Created staging directory at: 'C:\Users\punit\AppData\Local\Temp\appcfg2201895061249198461.tmp'
Scanning for jsp files.
Compiling jsp files.
Scanning files on local disk.
Initiating update.
Cloning 3 static files.
Cloning 29 application files.
Deploying:
Uploading 0 files.
Initializing precompilation...
Deploying new version.
Closing update: new version is ready to start serving.
Uploading index definitions.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=xxxxxxxxxx&version=9&
403 Forbidden
You do not have permission to modify this app (app_id=u's~xxxxxxxxxx').
And here is stacktrace in the log:
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=xxxxxxxxxx&version=9&
403 Forbidden
You do not have permission to modify this app (app_id=u's~xxxxxxxxxx').
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:336)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:287)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:266)
at com.google.appengine.tools.admin.NoLoggingClientDeploySender.send(NoLoggingClientDeploySender.java:35)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:1168)
at com.google.appengine.tools.admin.AppVersionUpload.updateIndexes(AppVersionUpload.java:534)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:205)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:572)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:58)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I had exactly the same error, no matter if I tried from Eclipse, from commandline with mvn appengine:update or with appcfg.sh update. The situation is that it's not possible to update
Datastore indices
Task queues
Cron jobs
403 Forbidden You do not have permission to modify this app
(app_id=u's~xxxxxxxxxx').
The only way to achieve a complete deployment seems to grant the user Project Owner permissions (maybe Project Editor would have been enough, I didn't test that) at least temporarily.

No instances in app engine admin console

I just deployed an app on Google App Engine and everything went fine. The app runs smoothly at < project-id >.appspot.com. I deployed it a few more times and one time there was an error:
05:56 PM Unknown error TEMPORARY_ERROR: . Deployed Version: 5.379937995233868117
ERROR: Unknown error TEMPORARY_ERROR: . Deployed Version: 5.379937995233868117
05:56 PM Rolling back the update. This can sometimes take a while since a VM version is being rolled back.
Could not start serving the given version.
ERROR: (gcloud.preview.app.deploy) Command failed with error code [1]
The app was still running and I could manage it to successfully deploy it again. But since then when I go to the admin console there is not a single instance listed. Only a small grey icon is shown with a flash. The path to the icon is '//ssl.gstatic.com/ui/v1/activityindicator/offline.png' (I looked it up in the CSS).
The app runs on a managed VM with a custom runtime.
Can anybody help me?
I was planning to deploy a managed VM with custom runtime and was watching this Google I/O bytes video and it seems it's expected. The manged vms with custom runtimes will show under Compute Engine on your developer console (4:35 in this video). You will be able to manage your App through App Engine on developer console.

Resources