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

标签 java maven google-app-engine

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

[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/

相关文章:

java - 文件中的 JUnit 测试

java - 如何在 Quarkus 原生镜像中包含类路径资源?

java - IntelliJ IDEA 无法解析 spring 导入的文件

java - 在 Jenkins 中找不到 JDK 和 Maven 配置

java - Project Reactor 条件执行

java - 如何解决 Tomcat 8/Library/Tomcat/work/Catalina/localhost 目录中缺少的 servlet 类?

security - 应用引擎 : what are best practices for transmitting a password and storing it securely in Google App Engine?

python - 使用 get_current_user() 方法时产生此 python AttributeError 的原因是什么?

java - 使日志消息在 Java GoogleAppEngine 开发服务器上可见(与 GWT 一起使用)

java - 试图解析 json 以在 android 上列出 View 但出现错误