当前位置: 首页 > 知识库问答 >
问题:

生成原生图像Quarkusrest客户端快速入门与centos-Quarkus-maven: 19.2.1失败

乐正意智
2023-03-14

堆栈:主机操作系统Windows 10和centos quarkus maven:19.2.1容器

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

    在我克隆了de rest-client-快速启动存储库并运行之后。/mvnw包-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个答案

翁文康
2023-03-14

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

 类似资料:
  • MinIO Client (mc)为ls,cat,cp,mirror,diff,find等UNIX命令提供了一种替代方案。它支持文件系统和兼容Amazon S3的云存储服务(AWS Signature v2和v4)。 ls 列出文件和文件夹。 mb 创建一个存储桶或一个文件夹。 cat 显示文件和对象内容。 pipe 将一个STDIN重定向到一个对象或者文

  • 变量绑定 Rust 通过 let 关键字进行变量绑定。 fn main() { let a1 = 5; let a2:i32 = 5; assert_eq!(a1, a2); //let 绑定 整数变量默认类型推断是 i32 let b1:u32 = 5; //assert_eq!(a1, b1); //去掉上面的注释会报错,因为类型不匹配

  • 当我建立一个本土形象时,我面临着一个反思的问题 通用域名格式。神谕svm。主持。代替DeletedElementException:不支持的java字段。朗,同学们。newInstanceCallerCache是可访问的:此元素的声明类已被替换,但替换类中不存在此元素 我该怎么修?我的环境GraalVM 20和Zulu OpenJdk11 我的pom

  • 我正在尝试使用GraalVM构建本机Quarkus映像,但遇到以下构建失败错误: 这是我第一次与GraalVM合作,所以我有点困惑。 以下是基本信息:Java版本17 Graavl VM版本graalvm-ce-javaV-22.1.0 我按照提供的步骤:https://stackoverflow.com/a/65837409/7584240和https://github.com/graalvm/

  • 在前面,我们都是把代码写在单一的文件里面,虽然看起来很方便,但也只是供学习的时候用用而已,真正在一个实际项目中,是不应该这样做的,为什么呢? 我们还是从 hello world 开始讲起,新建一个脚本文件,比如 hello.py。 $ cat hello.py # -*- coding: utf-8 -*- from flask import Flask app = Flask(__name__)