Cloud Foundry获取错误:未知CloudFoundryException:400 Bad Request错误:Cloud Foundry错误代码:-1

时间:2016-05-08 11:57:39

标签: jenkins

将spring-music app推送到https://api.run.pivotal.io 创建新的应用程序。

ERROR: Unknown CloudFoundryException: 400 Bad Request
ERROR: Cloud Foundry error code: -1
ERROR: The host is taken: spring-music
org.cloudfoundry.client.lib.CloudFoundryException: 400 Bad Request (The host is taken: spring-music)
    at org.cloudfoundry.client.lib.rest.CloudControllerResponseErrorHandler.getException(CloudControllerResponseErrorHandler.java:69)
    at org.cloudfoundry.client.lib.rest.CloudControllerResponseErrorHandler.handleError(CloudControllerResponseErrorHandler.java:24)
    at org.cloudfoundry.client.lib.org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:589)
    at org.cloudfoundry.client.lib.org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:547)
    at org.cloudfoundry.client.lib.rest.LoggingRestTemplate.doExecute(LoggingRestTemplate.java:54)
    at org.cloudfoundry.client.lib.org.springframework.web.client.RestTemplate.execute(RestTemplate.java:503)
    at org.cloudfoundry.client.lib.org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:331)
    at org.cloudfoundry.client.lib.rest.CloudControllerClientImpl.doAddRoute(CloudControllerClientImpl.java:1367)
    at org.cloudfoundry.client.lib.rest.CloudControllerClientImpl.bindRoute(CloudControllerClientImpl.java:1321)
    at org.cloudfoundry.client.lib.rest.CloudControllerClientImpl.addUris(CloudControllerClientImpl.java:1244)
    at org.cloudfoundry.client.lib.rest.CloudControllerClientImpl.createApplication(CloudControllerClientImpl.java:1187)
    at org.cloudfoundry.client.lib.rest.CloudControllerClientImpl.createApplication(CloudControllerClientImpl.java:1161)
    at org.cloudfoundry.client.lib.CloudFoundryClient.createApplication(CloudFoundryClient.java:247)
    at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.createApplicationIfNeeded(CloudFoundryPushPublisher.java:386)
    at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.processOneApp(CloudFoundryPushPublisher.java:248)
    at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.perform(CloudFoundryPushPublisher.java:188)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Build step 'Push to Cloud Foundry' marked build as failure
Finished: FAILURE

1 个答案:

答案 0 :(得分:0)

错误可能是因为主机名spring-music可能是由其他人拍摄的。因此,请指定可能解决您问题的其他应用程序名称和主机名