GraalVM镜像生成失败:objects.githubusercontent.com解析超时问题
GraalVM构建Docker镜像网络超时问题
系统配置
- Java版本:java 21.0.1 2023-10-17,Oracle GraalVM 21.0.1+12.1
- 硬件:i7处理器、64GB内存、Windows 11
- Docker Desktop:最新版本
可正常构建的配置
指定旧版本builder时可成功完成构建,对应的Gradle配置如下:
bootBuildImage { builder = 'paketobuildpacks/builder:0.1.374-tiny' environment = [ "JAVA_TOOL_OPTIONS":"-Xmx16384M", 'BP_NATIVE_IMAGE': 'true' ] }
构建命令:
./gradlew bootBuildImage --imageName=graaldemo
报错情况
使用新版本builder或不指定builder版本时,构建失败,错误日志如下:
[creator] Paketo Buildpack for Syft 1.41.1 [creator] https://github.com/paketo-buildpacks/syft [creator] Downloading from https://github.com/anchore/syft/releases/download/v0.98.0/syft_0.98.0_linux_amd64.tar.gz [creator] unable to invoke layer creator [creator] unable to get dependency syft [creator] unable to download https://github.com/anchore/syft/releases/download/v0.98.0/syft_0.98.0_linux_amd64.tar.gz [creator] unable to request https://github.com/anchore/syft/releases/download/v0.98.0/syft_0.98.0_linux_amd64.tar.gz [creator] Get "https://objects.githubusercontent.com/github-production-release-asset-2e65be/262126497/dcc1aed3-87ae-4236-b9c4-fba6fbf785f0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231223%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231223T211325Z&X-Amz-Expires=300&X-Amz-Signature=597aa2ae5009864df5d67bbaba6d3f117979275bd3253d1fa499d9643c4f8b06&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=262126497&response-content-disposition=attachment%3B%20filename%3Dsyft_0.98.0_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream": dial tcp: lookup objects.githubusercontent.com: i/o timeout [creator] ERROR: failed to build: exit status 1 > Task :bootBuildImage FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':bootBuildImage'. > Builder lifecycle 'creator' failed with status code 51 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 1m 5s 9 actionable tasks: 9 executed
已尝试的解决方案
- 更换Java版本
- 更新GraalVM版本
- 修改系统语言
- 关闭杀毒软件
以上方案均未解决问题,请求帮忙排查。
内容的提问来源于stack exchange,提问作者Muhammet Ali KAYA
相关产品推荐
相关产品推荐

