gpt4 book ai didi

java - 由于 : The default service (module) may not be deleted,,无法部署到 Google App Engine,并且必须至少包含一个版本

转载 作者:行者123 更新时间:2023-12-01 23:43:29 25 4
gpt4 key购买 nike

尝试将我的应用部署到应用引擎时,出现此错误:

[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% 确定这是正确的,因为 app is not correctly starting yet .

关于java - 由于 : The default service (module) may not be deleted,,无法部署到 Google App Engine,并且必须至少包含一个版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58249570/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com