【发布时间】:2019-11-18 19:53:19
【问题描述】:
我正在将 spring boot hello world 应用程序部署到 Cloud Foundry。使用 cf push 命令。出现以下错误:
Open JDK Memory Calculator Error: No Version Reasonable for '2.0.2_RELEASE' in 3.13.0_RELEASE
有人知道这个吗? 从下面的stackoverflow,我可以看到 2.0.2.RELEASE 作为开放的 jdk 版本: JDK availability in Cloud Foundry 我无法获得 3.13.0_RELEASE?
完整的日志:
Updating app TestPOC1...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
256.00 KiB / 256.00 KiB [=====================================================================================================================================================================] 100.00% 1s
Waiting for API to complete processing files...
Staging app and tracing logs...
Cell 919f72a9-975c-4bf3-8b2f-1f0e73bda65b creating container for instance 0597e6a8-7b92-4c71-8942-15c68c29b535
Cell 919f72a9-975c-4bf3-8b2f-1f0e73bda65b successfully created container for instance 0597e6a8-7b92-4c71-8942-15c68c29b535
Downloading app package...
Downloaded app package (16.2M)
[Buildpack] ERROR Compile failed with exception #<RuntimeError: Open JDK Like Memory Calculator error: No version resolvable for '2.0.2_RELEASE' in 3.13.0_RELEASE>
Open JDK Like Memory Calculator error: No version resolvable for '2.0.2_RELEASE' in 3.13.0_RELEASE
Failed to compile droplet: Failed to compile droplet: exit status 1
Exit status 223
Cell 919f72a9-975c-4bf3-8b2f-1f0e73bda65b stopping instance 0597e6a8-7b92-4c71-8942-15c68c29b535
Cell 919f72a9-975c-4bf3-8b2f-1f0e73bda65b destroying container for instance 0597e6a8-7b92-4c71-8942-15c68c29b535
Cell 919f72a9-975c-4bf3-8b2f-1f0e73bda65b successfully destroyed container for instance 0597e6a8-7b92-4c71-8942-15c68c29b535
Error staging application: App staging failed in the buildpack compile phase
FAILED
【问题讨论】:
-
它正在尝试安装一个不存在的版本 2.0.2.RELEASE,而您的 buildpack 中只存在 3.13.0_RELEASE。您使用的是什么版本的 JBP?您是否设置了任何前缀
JBP_*环境变量?这些可能会影响正在安装的版本。cf env的输出将有助于确定这一点。cf push的完整输出也会有所帮助,包括命令和您的 manifest.yml 在内的所有内容直到它失败为止。 -
我没有在 manifest.yml 文件中明确提到 JBP 版本。
cf env的输出不显示 JBP 版本号。起初,配置了 4.2 java build pack,现在降级到 3.9。然后开始出现这个错误。 -
好的,首先,不要使用 3.9。它超级旧。我认为当你在旧的东西和新的东西之间切换时,你也会看到奇怪。我建议您
cf delete应用程序,然后再次推送或cf push使用新的应用程序名称。要么会清除 buildpack 为您的应用程序缓存的内容,我认为它应该可以消除这种情况。或者切换回 4.LATEST 并使用它。您真的应该尝试在可能的最新版本上运行,以确保获得最新的 JVM 更新。 -
有道理@Daniel。我的组织 Cloud Foundry 帐户具有最新的 java build pack 3.9。这就是为什么尝试在 build pack v3.9 上运行应用程序。
-
好的,如果您必须回到 v3.9,只需使用新的应用程序,就像我上面提到的那样。这应该可以避免这样的奇怪问题。
标签: java cloud-foundry