Deployment to Google’s Compute Engine fails: Error retrieving the App Engine service account

喜夏-厌秋 提交于 2019-12-02 04:33:35

问题


After I’ve deleted some values (do not remember which) in my project configuration (in the Developer Console) I cannot deploy an app to a Compute Engine instance. I’ve deployed the same code using the same configuration dozens of times successfully but after deleting some values in the Developer Console or doing some other adjustments that I considered minor, the deployment, using Maven plugin v2.0.9.95.v20160203, fails with

[INFO] Beginning deployment...
[INFO] WARNING: If this is your first deployment, please try again.
[INFO] ERROR: (gcloud.preview.app.deploy) Server responded with code [400]:
[INFO]   Bad Request Unexpected HTTP status 400.
[INFO]   Failed Project Preparation (app_id='s~some-id'). Error retrieving the App Engine service account. 
[ERROR] Error: gcloud app command with exit code : 1

I run

mvn clean validate gcloud:deploy

Unlike in some other of my projects I do not have both of the accounts

  1. App Engine default service account - some-id@appspot.gserviceaccount.com
  2. Compute Engine default service account - some-id-compute@developer.gserviceaccount.com

…in my Permissions section but only the 2. account.


回答1:


Maybe you deleted your App Engine service account. To create it again, you can go to the Permissions section of your project and add a new member with the email YOUR-PROJECT-ID@appspot.gserviceaccount.com (replace with your real project id) and "Can Edit" permissions.




回答2:


Maybe you're not authenticated to your project anymore? Have you tried to reauthenticate using gcloud auth login?

If you're authenticated but happen somehow to delete default Google AppEngine service account (app_id@appspot.gserviceaccount.com), you won't be able to recreate them yourself. You will need to file a support ticket with Google and ask them to recreate the default service account for you.

Finally, you can create new project and deploy your application there but of course this comes at a price/time.



来源:https://stackoverflow.com/questions/35316238/deployment-to-google-s-compute-engine-fails-error-retrieving-the-app-engine-ser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!