无法连接到应用部署到CloudBees的主机MySQL数据库(Unable to connect t

2019-10-17 04:42发布

我跟着指示在这里 ,而是试图当我有以下错误:

hudson.util.IOException2: remote file operation failed: /scratch/jenkins/workspace/Xinco Demo Publish/Xinco/target/Xinco-2012-08-30_00-20-05.war at hudson.remoting.Channel@1fc6bdea:s-50b0ae50
    at hudson.FilePath.act(FilePath.java:783)
    at hudson.FilePath.act(FilePath.java:769)
    at com.cloudbees.plugins.deployer.DeployPublisher.perform(DeployPublisher.java:108)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:707)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:682)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:660)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:629)
    at hudson.model.Run.run(Run.java:1433)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Caused by: hudson.remoting.ProxyException: hudson.util.IOException2: Server.InternalError - Invalid WEB-INF/cloudbees-web.xml: resource
    at com.cloudbees.plugins.deployer.deployables.Deployable.deployFile(Deployable.java:151)
    at com.cloudbees.plugins.deployer.deployables.Deployable$DeployFileCallable.invoke(Deployable.java:342)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2048)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:287)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: hudson.remoting.ProxyException: com.cloudbees.api.BeesClientException: Server.InternalError - Invalid WEB-INF/cloudbees-web.xml: resource
    at com.cloudbees.api.BeesClient.readResponse(BeesClient.java:850)
    at com.cloudbees.api.BeesClient.applicationDeployArchive(BeesClient.java:435)
    at com.cloudbees.plugins.deployer.deployables.Deployable.deployFile(Deployable.java:123)
    ... 11 more
Build step 'Deploy to CloudBees' marked build as failure

完整的输出可以看出这里 。

Answer 1:

Caused by: hudson.remoting.ProxyException: com.cloudbees.api.BeesClientException: Server.InternalError - Invalid WEB-INF/cloudbees-web.xml: resource

cloudbees-web.xml没有遵循正确的格式。

见http://wiki.cloudbees.com/bin/view/RUN/CloudBeesWebXml -作为cloudbees-web.xml需要被包裹在一个外<cloudbees-web-app>元件



Answer 2:

你也不必使用CloudBees的-web.xml中,如果你不想要的 - 如果你的应用程序绑定到DB这将使它可以作为自动命名的数据源。

(见蜜蜂应用程式:bind命令)。

您只需做一次 - 然后应用程序将了解的数据源。

http://developer.cloudbees.com/bin/view/RUN/Resource+Management

https://developer.cloudbees.com/bin/view/RUN/DatabaseGuide

(不好意思,还是工作文档)。



文章来源: Unable to connect to host MySQL database on application deployed to CloudBees