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

Error when I run the command "mvn spring-boot:build-image" #25619

Closed
marciojusto opened this issue Mar 13, 2021 · 6 comments
Closed

Error when I run the command "mvn spring-boot:build-image" #25619

marciojusto opened this issue Mar 13, 2021 · 6 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@marciojusto
Copy link

marciojusto commented Mar 13, 2021

Spring Boot 2.4.3
Native Image 0.9.0

I'm using Mac Mini M1 with GraalVM 21.0.0.2.r11-grl (installed with sdkman)

Could you help me? Thanks in advance! Best Regards!

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  29.631 s
[INFO] Finished at: 2021-03-13T17:15:08Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:build-image (default-cli) on project spring-native-image: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:build-image failed: Builder lifecycle 'creator' failed with status code 101 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:build-image (default-cli) on project spring-native-image: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:build-image failed: **Builder lifecycle 'creator' failed with status code 101**
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:build-image failed: Builder lifecycle 'creator' failed with status code 101
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.springframework.boot.buildpack.platform.build.BuilderException: Builder lifecycle 'creator' failed with status code 101
    at org.springframework.boot.buildpack.platform.build.Lifecycle.run (Lifecycle.java:166)
    at org.springframework.boot.buildpack.platform.build.Lifecycle.execute (Lifecycle.java:119)
    at org.springframework.boot.buildpack.platform.build.Builder.executeLifecycle (Builder.java:193)
    at org.springframework.boot.buildpack.platform.build.Builder.build (Builder.java:103)
    at org.springframework.boot.maven.BuildImageMojo.buildImage (BuildImageMojo.java:181)
    at org.springframework.boot.maven.BuildImageMojo.execute (BuildImageMojo.java:171)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 13, 2021
@scottfrederick
Copy link
Contributor

@marciojusto Can you show the full output of the spring-boot:build-image command? That might give us a clue as to why the CNB builder is failing in the creator step, but it might be necessary for you to share a minimal sample that allows us to reproduce the problem. If you can come up with a minimal sample, you can attach it to this issue as a zip or share a link to a GitHub repo.

@scottfrederick scottfrederick added the status: waiting-for-feedback We need additional information before we can continue label Mar 13, 2021
@marciojusto
Copy link
Author

Follow the full output and my pom.xml. Thanks for the help!

pom.xml.txt

mvn_spring-boot_build-image.txt

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 13, 2021
@scottfrederick
Copy link
Contributor

The relevant section from the build output is here:

[INFO]  > Running creator
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     ======== Output: paketo-buildpacks/[email protected] ========
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     err:  paketo-buildpacks/[email protected]
[INFO]     [creator]     ERROR: No buildpack groups passed detection.
[INFO]     [creator]     ERROR: failed to detect: buildpack(s) failed with err

The qemu: uncaught target signal 11 (Segmentation fault) error is happening inside Docker Engine. This is possibly the same problem reported to Docker. Spring Boot is creating and running a Docker container from the Paketo CNB builder image docker.io/paketobuildpacks/builder:tiny, which uses the amd64 architecture. If you need a CNB builder image for a different architecture, you'll need to request that from the Paketo team. I'm afraid there's nothing Spring Boot can do to work around this problem.

@scottfrederick scottfrederick added for: external-project For an external project and not something we can fix and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Mar 14, 2021
@vijjukumar
Copy link

Do we have any workaround for this ?Still facing the same issue on apple M1 mac
Add support for arm64 paketo-buildpacks/stacks#51

@scottfrederick
Copy link
Contributor

There is no workaround in Spring Boot, as the problem is not in this project. A fix or workaround will have to come from the Paketo buildpacks team, Docker Engine, or QEMU.

@pvorb
Copy link
Contributor

pvorb commented Dec 20, 2021

You could use something else to build your docker images, though, like the excellent docker-maven-plugin from fabric8.io. Of course, this means that you are losing the features paketo provides out of the box. Here's a guide from Spring that might help you get started: https://spring.io/guides/gs/spring-boot-docker/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

5 participants