简体   繁体   中英

Quarkus native build issue

I have created a sample project and tried the following native build command: ./mvnw package -Pnative -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime=docker -DskipTests -X

It failed with the following.

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /Users/nicholas/dev/code-with-quarkus/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar/code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Using docker to run the native image builder
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Checking image status quay.io/quarkus/ubi-quarkus-native-image:22.1-java17
22.1-java17: Pulling from quarkus/ubi-quarkus-native-image
Digest: sha256:4a44a9a2b41eb7c0ed5ba705d33c2a42854b3cc9ad40cfdb4dacf231285b4da0
Status: Image is up to date for quay.io/quarkus/ubi-quarkus-native-image:22.1-java17
quay.io/quarkus/ubi-quarkus-native-image:22.1-java17
[DEBUG] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --rm quay.io/quarkus/ubi-quarkus-native-image:22.1-java17 --version
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 22.1.0 Java 17 CE (Java Version 17.0.3+7-jvmci-22.1-b06)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm -v /Users/nicholas/dev/code-with-quarkus/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-ElbQw quay.io/quarkus/ubi-quarkus-native-image:22.1-java17 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=CA -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature -H:-ParseOnce -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -J-Djava.awt.headless=true -H:FallbackThreshold=0 --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace code-with-quarkus-1.0.0-SNAPSHOT-runner -jar code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
Fatal error: com.oracle.svm.core.util.VMError$HostedError: java.nio.file.FileSystemException: /project: Operation not permitted
    at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72)
    at com.oracle.svm.hosted.NativeImageClassLoaderSupport$ClassInit.loadClassesFromPath(NativeImageClassLoaderSupport.java:644)
    at com.oracle.svm.hosted.NativeImageClassLoaderSupport$ClassInit.loadClassesFromPath(NativeImageClassLoaderSupport.java:600)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.nio.file.FileSystemException: /project: Operation not permitted
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
    at java.base/sun.nio.fs.UnixException.asIOException(UnixException.java:115)
    at java.base/sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.readNextEntry(UnixDirectoryStream.java:168)
    at java.base/sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.hasNext(UnixDirectoryStream.java:198)
    at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:349)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2845)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
    at com.oracle.svm.hosted.NativeImageClassLoaderSupport$ClassInit.loadClassesFromPath(NativeImageClassLoaderSupport.java:642)
    ... 11 more
Error: Image build request failed with exit status 1

I have tried many searches to see if anyone has similar issue but so far I have not find any relevant ones. Hope some expert in the quarkus community can shed some light on this

This problem magically went away for me when I move to 2.13.0.CR1 In the mean time my system rebooted and I restarted colima for macOS (which runs my docker)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM