Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native build show no output when using docker 20.10 on ubuntu wsl #32215

Closed
gmuellerinform opened this issue Mar 29, 2023 · 9 comments · Fixed by #37389
Closed

Native build show no output when using docker 20.10 on ubuntu wsl #32215

gmuellerinform opened this issue Mar 29, 2023 · 9 comments · Fixed by #37389
Labels
area/native-image env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@gmuellerinform
Copy link
Contributor

Describe the bug

Running
./mvnw clean package -Pnative -Dmaven.test.skip
results in

[ERROR] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Unable to get GraalVM version from the native-image binary.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1000:1000 ....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...

Checking the command
docker run --env LANG=C --rm --user 1000:1000 --rm quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.2-java17 --version
the output is indeed empty on ubuntu wsl with docker 20.10.

Adding the interactive flag -i fixes the problem.
Also, using 23.0 on windows and with the original command (no additional -i) does show the version.
The same is true for the actual build command. No difference between graalvmce or mandel images.

Expected behavior

See the output of native-image command

Actual behavior

[ERROR] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Unable to get GraalVM version from the native-image binary.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1000:1000 ....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:41 min
[INFO] Finished at: 2023-03-29T12:10:49+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.16.5.Final:build (default) on project cloudportal: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 1
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:422)
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:263)
[ERROR]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR]         at java.base

### How to Reproduce?

_No response_

### Output of `uname -a` or `ver`

Linux xxx 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

### Output of `java -version`

openjdk 19.0.2 2023-01-17

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.16.5.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Apache Maven 3.6.3 

### Additional information

_No response_
@zakkak
Copy link
Contributor

zakkak commented Nov 27, 2023

@gmuellerinform when you say:

Also, using 23.0 on windows and with the original command (no additional -i) does show the version.

Do you mean Mandrel/GraalVM 23.0 or Docker 23.0?

@gmuellerinform
Copy link
Contributor Author

I think I meant Mandrel/GraalVM 23.0.
It is still not working with Quarkus 3.5.0 and Docker 23 (Rancher Desktop 1.11.0) in WSL 2

@zakkak
Copy link
Contributor

zakkak commented Nov 27, 2023

So, it fails with Mandrel/GraalVM 22.3, works with 23.0 and fails again with 23.1?

That's weird, thanks for the info!

Do you happen to know a reliable way to determine whether docker is running in WSL?

@gmuellerinform
Copy link
Contributor Author

Ah, no. 23.0 works in Windows, but also not in WSL.

@gmuellerinform
Copy link
Contributor Author

gmuellerinform commented Nov 27, 2023

Do you happen to know a reliable way to determine whether docker is running in WSL?

No. But maybe you could rerun the command with '-i' if it succeeds but is empty?

@zakkak
Copy link
Contributor

zakkak commented Nov 27, 2023

@gmuellerinform could you please paste the output of docker version when running docker in WSL?

@gmuellerinform
Copy link
Contributor Author

gmuellerinform commented Nov 27, 2023

Client:
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.1
 Git commit:        20.10.21-0ubuntu1~22.04.3
 Built:             Thu Apr 27 05:57:17 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          23.0.6
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       9dbdbd4b6d7681bd18c897a6ba0376073c2a72ff
  Built:            Thu Oct 12 14:14:03 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.2
  GitCommit:        0cae528dd6cb557f7201036e9f43420650207b58
 runc:
  Version:          1.1.7
  GitCommit:        860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
 docker-init:
  Version:          0.19.0
  GitCommit:  

@gmuellerinform
Copy link
Contributor Author

Client:
Version: 20.10.21

looks suspicious...

@zakkak
Copy link
Contributor

zakkak commented Nov 29, 2023

@gmuellerinform how did you install docker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants