使用centos-quarkus-maven生成本地映像quarkus rest-client-quickstart:19.2.1失败

时间:2019-12-05 21:43:36

标签: docker quarkus graalvm graalvm-native-image

堆栈: 托管操作系统Windows10和centos-quarkus-maven:19.2.1容器

  • openjdk版本“ 1.8.0_232”
  • OpenJDK运行时环境(内部版本1.8.0_232-20191008104205.buildslave.jdk8u-src-tar--b07)
  • OpenJDK 64位GraalVM CE 19.2.1(内部版本25.232-b07-jvmci-19.2-b03,混合模式)

    克隆了de rest-client-quickstart存储库并运行./mvnw package -Dnative -DskipTests -X之后 我陷入了这个错误:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on OpenJDK 64-Bit GraalVM CE 19.2.1
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /opt/graalvm/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rest-client-quickstart-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:+JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace rest-client-quickstart-1.0-SNAPSHOT-runner
[rest-client-quickstart-1.0-SNAPSHOT-runner:477]    classlist:  12,444.61 ms
[rest-client-quickstart-1.0-SNAPSHOT-runner:477]        (cap):   1,994.66 ms
[rest-client-quickstart-1.0-SNAPSHOT-runner:477]        setup:   5,434.00 ms
05:47:16,402 INFO  [org.jbo.threads] JBoss Threads version 3.0.0.Final
[DEBUG] [org.jboss.threads] Thread "Thread[build-16,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-13,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-6,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-1,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-12,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-2,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-3,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-17,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-11,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-18,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-10,5,build group]" exiting
[DEBUG] [io.quarkus.builder] Finished step "io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build" in 449562 ms
[DEBUG] [io.quarkus.builder] Dependency of "io.quarkus.deployment.pkg.steps.NativeImageBuildStep#result" finished; 0 remaining
[DEBUG] [io.quarkus.builder] Starting step "io.quarkus.deployment.pkg.steps.NativeImageBuildStep#result"
[DEBUG] [io.quarkus.builder] Finished step "io.quarkus.deployment.pkg.steps.NativeImageBuildStep#result" in 1 ms
[DEBUG] [io.quarkus.builder] End step completed; 0 remaining
[DEBUG] [org.jboss.threads] Thread "Thread[build-8,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-15,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-9,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-14,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-19,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-5,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-4,5,build group]" exiting
[DEBUG] [org.jboss.threads] Thread "Thread[build-7,5,build group]" exiting
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:37 min
[INFO] Finished at: 2019-12-05T05:54:19Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.0.1.Final:native-image (default) on project rest-client-quickstart: Failed to generate a native image: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:289)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
[ERROR]         at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
[ERROR]         at java.lang.Thread.run(Thread.java:748)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:278)
[ERROR]         ... 12 more
[ERROR] -> [Help 1] 

PS:JVM模式工作正常

1 个答案:

答案 0 :(得分:0)

在我的centos容器上分配更多的内存并禁用oom-kill可以达到目的。 在谷歌搜索完整日志中显示的“退出代码137”后,我找到了解决方案。