gpt4 book ai didi

grails - 尝试从Cloudbees Jenkins部署到Cloudfoundry时显示“403 Forbidden”

转载 作者:行者123 更新时间:2023-12-02 15:32:42 25 4
gpt4 key购买 nike

我试图在Cloudbees上建立持续集成,运行Jenkins,并将Grails应用程序部署到Cloudfoundry。

我按照this blog post中的步骤进行操作,但是Jenkins构建在尝试将WAR部署到Cloudfoundry时失败。

异常消息是“403禁止(没有足够的内存容量,您被允许:2048M)”。我可以在Jenkins / Cloudfoundry部署配置中指定的最大大小仅为2048MB,因此此消息对我来说没有意义。我尝试将内存分配减少到1024MB,但仍然收到相同的消息。

如果我使用Grails Cloudfoundry插件手动部署它,那么我的应用程序可以在Cloudfoundry上运行而没有任何问题,并且只有1GB即可正常运行。

有任何想法吗?

[cloudbees-deployer:cloudfoundry]   Processing matched resources: 9395721
[cloudbees-deployer:cloudfoundry] done.
[cloudbees-deployer:cloudfoundry] Setting number of instances... done.
[cloudbees-deployer:cloudfoundry] Application state: unknown
[cloudbees-deployer:cloudfoundry] Starting application...
com.cloudbees.plugins.deployer.exceptions.DeployException: remote file operation failed: /scratch/jenkins/workspace/myApp/target/myApp-0.1.war at hudson.remoting.Channel@1c179d4c:s-c0eee604
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:162)
at com.cloudbees.plugins.deployer.engines.Engine.perform(Engine.java:96)
at com.cloudbees.plugins.deployer.DeployPublisher.perform(DeployPublisher.java:95)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:728)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:703)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:650)
at hudson.model.Run.execute(Run.java:1530)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: hudson.util.IOException2: remote file operation failed: /scratch/jenkins/workspace/myApp/target/myApp-0.1.war at hudson.remoting.Channel@1c179d4c:s-c0eee604
at hudson.FilePath.act(FilePath.java:877)
at hudson.FilePath.act(FilePath.java:863)
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:156)
... 11 more
Caused by: hudson.remoting.ProxyException: org.cloudfoundry.client.lib.CloudFoundryException: 403 Forbidden (Not enough memory capacity, you're allowed: 2048M)
at org.cloudfoundry.client.lib.rest.AbstractCloudControllerClient$ErrorHandler.handleError(AbstractCloudControllerClient.java:357)
at com.cloudbees.shaded.org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486)
at com.cloudbees.shaded.org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443)
at org.cloudfoundry.client.lib.rest.LoggingRestTemplate.doExecute(LoggingRestTemplate.java:54)
at com.cloudbees.shaded.org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401)
at com.cloudbees.shaded.org.springframework.web.client.RestTemplate.put(RestTemplate.java:327)
at org.cloudfoundry.client.lib.rest.CloudControllerClientV1.doUpdateApplication(CloudControllerClientV1.java:615)
at org.cloudfoundry.client.lib.rest.CloudControllerClientV1.startApplication(CloudControllerClientV1.java:342)
at com.cloudbees.plugins.deployer.impl.cloudfoundry.EngineImpl$DeployFileCallable.invoke(EngineImpl.java:637)
at com.cloudbees.plugins.deployer.impl.cloudfoundry.EngineImpl$DeployFileCallable.invoke(EngineImpl.java:307)
at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:248)
at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:236)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2275)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Build step 'Deploy applications' marked build as failure
Finished: FAILURE

最佳答案

在CloudFoundry v1上,每个帐户在所有已部署的 Activity 应用程序中的总内存使用量为2048mb。

如果您已经部署了一些应用程序,并尝试在将其总内存推到2048以上的位置再添加一个,则将看到此错误。

解决方案是减少部署的应用程序的数量,以便您的帐户中有足够的可用内存来部署应用程序。

关于grails - 尝试从Cloudbees Jenkins部署到Cloudfoundry时显示“403 Forbidden”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16829815/

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