当前位置: 首页 > 面试题库 >

(gcloud.preview.app.deploy)错误响应:此部署不支持[400]“ env”设置

田鹤轩
2023-03-14
问题内容

我尝试了这些教程https://cloud.google.com/tools/cloud-repositories/docs/push-to-
deploy
,并且

,但出现以下错误消息:

    [dev-jenkins-test-1] $ /bin/sh -xe /tmp/hudson4310631253025446569.sh
    + mvn gcloud:deploy
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building jenkins-test-java 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] >>> gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) > package @ jenkins-test-java >>>
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jenkins-test-java ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/main/resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ jenkins-test-java ---
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jenkins-test-java ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/test/resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ jenkins-test-java ---
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ jenkins-test-java ---
    [INFO] No tests to run.
    [INFO] 
    [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jenkins-test-java ---
    [WARNING] JAR will be empty - no content was marked for inclusion!
    [INFO] 
    [INFO] <<< gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) < package @ jenkins-test-java <<<
    [INFO] 
    [INFO] --- gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) @ jenkins-test-java ---
    [INFO] Running gcloud app deploy...
    [INFO] Running python -S /google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=straw-hat-pirates-dev preview app deploy /var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml
    [INFO] WARNING: Soon, deployments will set the deployed version to receive all traffic by
    [INFO] default.
    [INFO] 
    [INFO] To keep the current behavior (where new deployments do not receive any traffic),
    [INFO] use the `--no-promote` flag or run the following command:
    [INFO] 
    [INFO]   $ gcloud config set app/promote_by_default false
    [INFO] 
    [INFO] To adopt the new behavior early, use the `--promote` flag or run the following
    [INFO] command:
    [INFO] 
    [INFO]   $ gcloud config set app/promote_by_default true
    [INFO] 
    [INFO] Either passing one of the new flags or setting one of these properties will
    [INFO] silence this message.
    [INFO] 
    [INFO] You are about to deploy the following modules:
    [INFO]  - straw-hat-pirates-dev/default (from [/var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml])
    [INFO]      Deployed URL: [https://20151223t054356-dot-straw-hat-pirates-dev.appspot.com]
    [INFO]      (add --promote if you also want to make this module available from
    [INFO]      [https://straw-hat-pirates-dev.appspot.com])
    [INFO] 
    [INFO] Beginning deployment...
    [INFO] Verifying that Managed VMs are enabled and ready.
    [INFO] 
    [INFO] Provisioning remote build service.
    [INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
    [INFO] Building and pushing image for module [default]
    [INFO] ----------------------------- DOCKER BUILD OUTPUT ------------------------------
    [INFO] Step 0 : FROM gcr.io/google_appengine/openjdk8
    [INFO] ---> 3c058a018ce1
    [INFO] Step 1 : ADD jenkins-test-java-1.0-SNAPSHOT.jar /app/
    [INFO] ---> 938437aaa1a1
    [INFO] Removing intermediate container 4106bc3645ca
    [INFO] Step 2 : ENTRYPOINT java -jar /app/jenkins-test-java-1.0-SNAPSHOT.jar
    [INFO] ---> Running in f187a76322dd
    [INFO] ---> 4600e0f4d83a
    [INFO] Removing intermediate container f187a76322dd
    [INFO] Successfully built 4600e0f4d83a
    [INFO] --------------------------------------------------------------------------------
    [INFO] 
    [INFO] Updating module [default]...
    [INFO] Updating module [default].../
    [INFO] Updating module [default]...failed.
    [INFO] ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
    [INFO] Deleted [https://www.googleapis.com/compute/v1/projects/straw-hat-pirates-dev/zones/us-central1-f/instances/gae-builder-vm-20151223t054356].
    [ERROR] Error: gcloud app command with exit code : 1
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:03 min
    [INFO] Finished at: 2015-12-23T05:45:57+00:00
    [INFO] Final Memory: 11M/56M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 1 -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    Build step 'Execute shell' marked build as failure
    Finished: FAILURE

我猜:
我的环境配置似乎有问题。
我仍然无法解决此问题。
感谢您的帮助。:)


问题答案:

我想到了。

我敢打赌你的Maven模块没有设置 <packaging>war</packaging>

如果您的模块设置为jar(默认),则它将尝试部署为标准Java应用程序,以在其中启动您自己的服务器。由于您希望运行appengine的托管虚拟机,因此需要打包为war,然后插件将负责其余的工作。

干杯。



 类似资料:
  • 我正在尝试使用Eclipse IDE(使用Windows 7)创建我的第一个C exeecutable。我得到了以下错误,而建设。 如何纠正它? 错误:: 无法获取主线程的上下文,错误 998 信息:配置“Debug”使用此系统不支持的工具链“Cygwin GCC”,仍在尝试构建。 使所有 构建文件:../src/lest test . CPP '[SIG]C:\ cygnus \ Cygwin-

  • 我正在MotoG(Lollipop5.1)上测试我的项目,还有一个XperiaT2(KitKat 4.4)上没有的问题。错误日志为: 我正在使用android。支持:设计库,但不实例化NavigationView,我尝试使用 和 并且没有解决。也许问题与之前的支持问题有关:appcompat库,当我尝试使用23.1.1较低版本时发生此错误 我的实际Gradle配置是: 请帮忙。 更新 当我尝试使用

  • 我使用Apache Tomcat 8.5.8部署了一个静态Web应用程序 当我调用普通URL时,它工作正常。http://localhost/example/index.html 但是当我调用下面的URL时,它给我400个错误请求错误。http://localhost/example/index.html?host_info=Outlook|网页 我知道这是因为URL具有特殊字符(|)。但我无法配

  • V2.6.5 在Heroku上部署API后请求API时,我面临一个400错误的错误请求。但我不知道为什么? 我所做的: > 在/api的根目录中添加了Procfile 补充。htaccess in/api/public(通过composer需要symfony/apache-pack命令) Heroku Dashboard应用程序设置上定义的APP\u ENV和DATABASE\u URL 在Her

  • 线程名称:Converse_Chat_No 1-1示例开始:2018-06-06 14:29:19 IST加载时间:1313连接时间:1104延迟:1313大小以字节为单位:1639发送字节:1982头大小以字节为单位:554正文大小以字节为单位:1085示例计数:1错误计数:1数据类型(“text”“bin”“”):文本响应代码:400响应消息:错误请求 响应标题:HTTP/1.1 400错误请

  • 我是K8s的新手,所以仍然试图让我的头脑周围的事情。我一直在研究部署,并能够理解它们将有多有用。但是,我不明白为什么它们不支持服务(只支持副本集和豆荚)。