首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cloud Foundry无法部署grails应用程序[UnknownHostException]

Cloud Foundry无法部署grails应用程序[UnknownHostException]
EN

Stack Overflow用户
提问于 2013-11-05 18:04:25
回答 1查看 636关注 0票数 1

我最近尝试在cloud foundry上部署一个Grails项目,在执行"grails cf-push“时得到以下错误

代码语言:javascript
复制
Environment set to production.....
Error Error executing script_ CfPush: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://api.cloudfoundry.com/users/username@gmail.com/tokens":api.cloudfoundry.com; nested exception is java.net.UnknownHostException: api.cloudfoundry.com (Use --stacktrace to see the full trace)

对于"grails cf-push --stacktrace":

代码语言:javascript
复制
Error Error executing script_ CfPush: org.springframework.web.client.ResourceAccessException: I/O error: api.cloudfoundry.com; nested exception is java.net.UnknownHostException: api.cloudfoundry.com (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.springframework.web.client.ResourceAccessException: I/O error: api.cloudfoundry.com; nested exception is java.net.UnknownHostException: api.cloudfoundry.com
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:461)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:409)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:287)
at org.cloudfoundry.client.lib.CloudFoundryClient.login(CloudFoundryClient.java:210)
at ClientWrapper.methodMissing(_CfCommon_groovy:536)
at _CfCommon_groovy$_run_closure5.doCall(_CfCommon_groovy:110)
at _CfCommon_groovy$_run_closure5.call(_CfCommon_groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at CfPush$_run_closure1.doCall(CfPush:40)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at java_util_concurrent_Callable$call.call(Unknown Source)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at java_util_concurrent_Callable$call.call(Unknown Source)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at java_util_concurrent_Callable$call.call(Unknown Source)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:591)
at gant.Gant.executeTargets(Gant.groovy:590)
Caused by: java.net.UnknownHostException: api.cloudfoundry.com
at grails.plugin.cloudfoundry.GrailsHttpRequestFactory$1.intercept(GrailsHttpRequestFactory.java:91)
at $java.net.HttpURLConnection$$EnhancerByCGLIB$$7c6bfa30.connect(<generated>)
at grails.plugin.cloudfoundry.GrailsHttpRequest.executeInternal(GrailsHttpRequest.java:75)
at grails.plugin.cloudfoundry.GrailsHttpRequest.executeInternal(GrailsHttpRequest.java:89)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:446)
... 30 more

就在几个月前,一切都很好,但我不得不在一段时间内停止对这个项目的工作。当我回到它的时候,我意识到不再可能以我一直以来的方式部署它。

我假设我需要升级我的云铸造插件,所以在一天的工作中,我升级了整个groovy/grails环境:

groovy 2.0.5到2.1.9 grails 2.1.2到2.3.1

以及使用以下说明的项目本身:http://grails.org/doc/2.3.0.M1/guide/upgradingFromPreviousVersionsOfGrails.html

依赖关系的解决相当顺利(以及最新的cloud-foundry 1.2.3插件)。但是部署仍然失败,并出现相同的错误。

"vmc info“告诉我"api.cloudfoundry.com”不存在。我有很多想法。地址改变了吗?有没有什么照本宣科的方法来修复它,或者它是不是发生在这里?

EN

回答 1

Stack Overflow用户

发布于 2013-11-28 04:02:10

"api.cloudfoundry.com“是托管的Cloud Foundry v1的URL,该URL已不存在。Cloudfoundry.com已经替换为http://run.pivotal.io,即云铸造v2。

Cloud Foundry Grails插件尚未更新为支持CF v2。您应该使用" CF“CLI来与CF交互,而不是使用Grails插件脚本。参见http://docs.cloudfoundry.com/docs/using/managing-apps/cf/index.htmlhttp://docs.cloudfoundry.com/docs/using/deploying-apps/jvm/index.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19786286

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档