quarkus: [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
Describe the bug
I created and downloaded the most simple Quarkus application from https://code.quarkus.io/ using Gradle with Kotlin DSL
as Build Tool
.
What works:
./gradlew addExtension --extensions=quarkus-container-image-docker
./gradlew imageBuild
What doesn’t work:
./gradlew clean imageBuild -Dquarkus.package.type=native -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime=docker
It fails with
> Task :quarkusAppPartsBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':quarkusAppPartsBuild'.
> There was a failure while executing work items
> A failure occurred while executing io.quarkus.gradle.tasks.worker.BuildWorker
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:223)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at java.base/java.lang.Thread.run(Thread.java:840)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalArgumentException: Cannot parse version from output:
at io.quarkus.deployment.pkg.steps.GraalVM$Version.of(GraalVM.java:281)
at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:37)
... 12 more
Output of uname -a
or ver
Linux SAG-H56RXL3 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 GNU/Linux
Output of java -version
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode, sharing)
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.5.3
Build tool (ie. output of mvnw --version
or gradlew --version
)
------------------------------------------------------------
Gradle 8.4
------------------------------------------------------------
Build time: 2023-10-04 20:52:13 UTC
Revision: e9251e572c9bd1d01e503a0dfdf43aedaeecdc3f
Kotlin: 1.9.10
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.9 (Eclipse Adoptium 17.0.9+9)
OS: Linux 5.10.102.1-microsoft-standard-WSL2 amd64
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Use `--interactive` option when using docker inside Windows' WSL There seems to be an issue with docker printing output when running in Windows' WSL without `--interactive`. Closes https://github.co... — committed to zakkak/quarkus by zakkak 7 months ago
- Use `--interactive` option when using docker inside Windows' WSL There seems to be an issue with docker printing output when running in Windows' WSL without `--interactive`. Closes https://github.co... — committed to zakkak/quarkus by zakkak 7 months ago
- Use `--interactive` option when using docker inside Windows' WSL There seems to be an issue with docker printing output when running in Windows' WSL without `--interactive`. Closes https://github.co... — committed to zakkak/quarkus by zakkak 7 months ago
- Use `--interactive` option when using docker inside Windows' WSL There seems to be an issue with docker printing output when running in Windows' WSL without `--interactive`. Closes https://github.co... — committed to zakkak/quarkus by zakkak 7 months ago
- Use `--interactive` option when using docker inside Windows' WSL There seems to be an issue with docker printing output when running in Windows' WSL without `--interactive`. Closes https://github.co... — committed to zakkak/quarkus by zakkak 7 months ago
Hi! I already reported this some time ago with WSL and Rancher Desktop (still not working! 3.5.0): #32215
I’m not sure if the referenced
docker/cli
ticket is relevant in this context, I’m observing the exact opposite behavior:I’m using Rancher Desktop version
1.7.0
. Directly under Windows, using PowerShell, CMD, or MSYS2, running thehello-world
container prints the expected output toSTDOUT
on the host terminal no matter if option--interactive
is specified or not. In contrast, in the Kali Linux WSL VE terminal, I’m only presented with the output if option--interactive
is specified.The same is true for command
docker run --rm --env=LANG=C --user=1000:1000 --interactive quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 java --version
.Yeah, I tried something similar and it always succeeds without error but returned nothing. I assume this is a Windows/WSL issue. Adding the
--interactive
option returns something meaningful:@tglaeser consider visiting https://support.github.com/request?q=delete+issue+attachment and pasting the attachment url to permanently delete the attachment. It doesn’t let me do it since I am not the uploader.