![](/img/trans.png)
[英]Google App Engine: Can I programmatically find out if this is the default version?
[英]Can't deploy to Google App Engine due to: The default service (module) may not be deleted, and must comprise at least one version
嘗試將我的應用程序部署到應用程序引擎時,出現此錯誤:
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: In place deployments of App Engine Flexible Environment over an existing version are not supported. Please use a different version name, or delete the existing version first.
我通過運行來部署應用程序:
mvn clean package appengine:deploy -P cloud-gcp
只有一個版本:
> gcloud app versions list
SERVICE VERSION TRAFFIC_SPLIT LAST_DEPLOYED SERVING_STATUS
default 1 1.00 2019-10-05T10:22:54+01:00 SERVING
所以,我不能刪除它:
> gcloud app versions delete 1
ERROR: (gcloud.app.versions.delete) The default service (module) may not be deleted, and must comprise at least one version.
我缺少什么來管理部署這個應用程序?
我最初按照本教程配置了我的應用程序: https://cloud.google.com/appengine/docs/standard/java11/quickstart (我想,我不確定)
但后來我切換到這個,因為它包含我的應用程序需要的數據庫配置: https://www.baeldung.com/spring-boot-google-app-engine
我復制的配置是:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<version>1</version>
<projectId>GCLOUD_CONFIG</projectId>
</configuration>
</plugin>
並將該版本更改為 2 將錯誤消息更改為:
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.
我的問題仍然存在,部署應用程序的明智方法是什么,而不必每次都提交新的pom.xml
文件並且在達到 120 個部署版本時必須手動刪除版本?
顯然解決方案是這樣配置它:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<version>recruiter-wtf</version>
<projectId>GCLOUD_CONFIG</projectId>
</configuration>
</plugin>
但我不是 100% 確定這是正確的,因為應用程序尚未正確啟動。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.