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

Quarkus 1.6.0 fast-jar jib container generation error #10599

Closed
gino-smart4p opened this issue Jul 9, 2020 · 2 comments
Closed

Quarkus 1.6.0 fast-jar jib container generation error #10599

gino-smart4p opened this issue Jul 9, 2020 · 2 comments
Labels
area/container-image kind/bug Something isn't working triage/duplicate This issue or pull request already exists

Comments

@gino-smart4p
Copy link

After Quarkus 1.6.0 upgrade the jib fast-jar container generation doesn't work anymore.

Tested on "getting-started" project, too, same issue.

Environment:

  • OS: Linux myserver 4.15.0-108-generic #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Java version:
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)`: 
  • Quarkus version: 1.6.0.Final
  • Maven version:
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)
Maven home: /home/ubuntu/.m2/wrapper/dists/apache-maven-3.6.2-bin/795eh28tki48bv3l67maojf0ra/apache-maven-3.6.2
Java version: 11.0.7, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-108-generic", arch: "amd64", family: "unix"

Steps to reproduce:

first build after git clone

ubuntu@myserver:~/quarkus-quickstarts/getting-started$ ./mvnw clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ getting-started ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ubuntu/quarkus-quickstarts/getting-started/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ubuntu/quarkus-quickstarts/getting-started/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ubuntu/quarkus-quickstarts/getting-started/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ getting-started ---
...
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.getting.started.GreetingResourceTest
2020-07-09 11:48:58,739 INFO  [io.quarkus] (main) Quarkus 1.6.0.Final on JVM started in 2.749s. Listening on: http://0.0.0.0:8081
2020-07-09 11:48:58,742 INFO  [io.quarkus] (main) Profile test activated. 
2020-07-09 11:48:58,742 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.411 s - in org.acme.getting.started.GreetingResourceTest
2020-07-09 11:49:00,870 INFO  [io.quarkus] (main) Quarkus stopped in 0.097s
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ getting-started ---
[INFO] Building jar: /home/ubuntu/quarkus-quickstarts/getting-started/target/getting-started-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- quarkus-maven-plugin:1.6.0.Final:build (default) @ getting-started ---
[INFO] [org.jboss.threads] JBoss Threads version 3.1.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building thin jar: /home/ubuntu/quarkus-quickstarts/getting-started/target/getting-started-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 2311ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  17.621 s
[INFO] Finished at: 2020-07-09T11:49:04+02:00
[INFO] ------------------------------------------------------------------------

JIB image container generator adding

ubuntu@myserver:~/quarkus-quickstarts/getting-started$ ./mvnw quarkus:add-extension -Dextensions="container-image-jib"
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
....
✅ Extension io.quarkus:quarkus-container-image-jib has been installed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.991 s
[INFO] Finished at: 2020-07-09T11:50:18+02:00
[INFO] ------------------------------------------------------------------------

build image and push on local registry (fast-jar disabled)

ubuntu@myserver:~/quarkus-quickstarts/getting-started$ ./mvnw clean package -Dquarkus.container-image.push=true
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ getting-started ---
[INFO] Deleting /home/ubuntu/quarkus-quickstarts/getting-started/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ubuntu/quarkus-quickstarts/getting-started/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ubuntu/quarkus-quickstarts/getting-started/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ubuntu/quarkus-quickstarts/getting-started/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ getting-started ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.getting.started.GreetingResourceTest
...
2020-07-09 11:50:41,403 INFO  [io.quarkus] (main) Quarkus 1.6.0.Final on JVM started in 2.403s. Listening on: http://0.0.0.0:8081
2020-07-09 11:50:41,406 INFO  [io.quarkus] (main) Profile test activated. 
2020-07-09 11:50:41,407 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.01 s - in org.acme.getting.started.GreetingResourceTest
2020-07-09 11:50:43,207 INFO  [io.quarkus] (main) Quarkus stopped in 0.069s
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ getting-started ---
[INFO] Building jar: /home/ubuntu/quarkus-quickstarts/getting-started/target/getting-started-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- quarkus-maven-plugin:1.6.0.Final:build (default) @ getting-started ---
[INFO] [org.jboss.threads] JBoss Threads version 3.1.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building thin jar: /home/ubuntu/quarkus-quickstarts/getting-started/target/getting-started-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Starting container image build
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Base image 'fabric8/java-alpine-openjdk11-jre' does not use a specific image digest - build may not be reproducible
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Cannot verify server at https://localhost:32000/v2/. Attempting again with no TLS verification.
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Failed to connect to https://localhost:32000/v2/ over HTTPS. Attempting again with HTTP.
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] The base image requires auth. Trying again for fabric8/java-alpine-openjdk11-jre...
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Using base image with digest: sha256:b459cc59d6c7ddc9fd52f981fc4c187f44a401f2433a1b4110810d2dd9e98a07
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Container entrypoint set to [java, -Dquarkus.http.host=0.0.0.0, -Djava.util.logging.manager=org.jboss.logmanager.LogManager, -cp, /app/resources:/app/classes:/app/libs/*, io.quarkus.runner.GeneratedMain]
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Pushed container image localhost:32000/projects/getting-started (sha256:d4da4aee5dce83f1eb11f253f5c20b262d0e9f4648ccad08008020d1beb7dd7f)
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 7831ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  22.896 s
[INFO] Finished at: 2020-07-09T11:50:52+02:00
[INFO] ------------------------------------------------------------------------

build image and push on local registry (fast-jar enabled)

ubuntu@myserver:~/quarkus-quickstarts/getting-started$ ./mvnw clean package -Dquarkus.container-image.push=true -Dquarkus.package.type=fast-jar
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ getting-started ---
[INFO] Deleting /home/ubuntu/quarkus-quickstarts/getting-started/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ubuntu/quarkus-quickstarts/getting-started/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ubuntu/quarkus-quickstarts/getting-started/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ubuntu/quarkus-quickstarts/getting-started/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ getting-started ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.getting.started.GreetingResourceTest
2020-07-09 11:51:32,616 INFO  [io.quarkus] (main) Quarkus 1.6.0.Final on JVM started in 2.951s. Listening on: http://0.0.0.0:8081
2020-07-09 11:51:32,619 INFO  [io.quarkus] (main) Profile test activated. 
2020-07-09 11:51:32,619 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.636 s - in org.acme.getting.started.GreetingResourceTest
2020-07-09 11:51:35,319 INFO  [io.quarkus] (main) Quarkus stopped in 0.084s
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ getting-started ---
[INFO] Building jar: /home/ubuntu/quarkus-quickstarts/getting-started/target/getting-started-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- quarkus-maven-plugin:1.6.0.Final:build (default) @ getting-started ---
[INFO] [org.jboss.threads] JBoss Threads version 3.1.1.Final
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Starting container image build
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Base image 'fabric8/java-alpine-openjdk11-jre' does not use a specific image digest - build may not be reproducible
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Cannot verify server at https://localhost:32000/v2/. Attempting again with no TLS verification.
[WARNING] [io.quarkus.container.image.jib.deployment.JibProcessor] Failed to connect to https://localhost:32000/v2/ over HTTPS. Attempting again with HTTP.
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] The base image requires auth. Trying again for fabric8/java-alpine-openjdk11-jre...
[INFO] [io.quarkus.container.image.jib.deployment.JibProcessor] Using base image with digest: sha256:b459cc59d6c7ddc9fd52f981fc4c187f44a401f2433a1b4110810d2dd9e98a07
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20.106 s
[INFO] Finished at: 2020-07-09T11:51:42+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.6.0.Final:build (default) on project getting-started: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.container.image.jib.deployment.JibProcessor#buildFromJar threw an exception: java.lang.RuntimeException: Unable to create container image
[ERROR] 	at io.quarkus.container.image.jib.deployment.JibProcessor.containerize(JibProcessor.java:153)
[ERROR] 	at io.quarkus.container.image.jib.deployment.JibProcessor.buildFromJar(JibProcessor.java:102)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] 	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.util.concurrent.ExecutionException: java.nio.file.NoSuchFileException: /home/ubuntu/quarkus-quickstarts/getting-started/target/lib
[ERROR] 	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:552)
[ERROR] 	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:513)
[ERROR] 	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:82)
[ERROR] 	at com.google.cloud.tools.jib.builder.steps.PushLayerStep.call(PushLayerStep.java:79)
[ERROR] 	at com.google.cloud.tools.jib.builder.steps.PushLayerStep.call(PushLayerStep.java:33)
[ERROR] 	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
[ERROR] 	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
[ERROR] 	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
[ERROR] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[ERROR] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] Caused by: java.nio.file.NoSuchFileException: /home/ubuntu/quarkus-quickstarts/getting-started/target/lib
[ERROR] 	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
[ERROR] 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[ERROR] 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
[ERROR] 	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
[ERROR] 	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
[ERROR] 	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
[ERROR] 	at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
[ERROR] 	at java.base/java.nio.file.Files.getLastModifiedTime(Files.java:2314)
[ERROR] 	at com.google.cloud.tools.jib.cache.LayerEntriesSelector$LayerEntryTemplate.<init>(LayerEntriesSelector.java:77)
[ERROR] 	at com.google.cloud.tools.jib.cache.LayerEntriesSelector.toSortedJsonTemplates(LayerEntriesSelector.java:153)
[ERROR] 	at com.google.cloud.tools.jib.cache.LayerEntriesSelector.generateSelector(LayerEntriesSelector.java:169)
[ERROR] 	at com.google.cloud.tools.jib.cache.Cache.retrieve(Cache.java:182)
[ERROR] 	at com.google.cloud.tools.jib.builder.steps.BuildAndCacheApplicationLayerStep.call(BuildAndCacheApplicationLayerStep.java:102)
[ERROR] 	at com.google.cloud.tools.jib.builder.steps.BuildAndCacheApplicationLayerStep.call(BuildAndCacheApplicationLayerStep.java:38)
[ERROR] 	... 6 more
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoExecutionException
ubuntu@myserver:~/quarkus-quickstarts/getting-started$ 
@gino-smart4p gino-smart4p added the kind/bug Something isn't working label Jul 9, 2020
@quarkusbot
Copy link

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Jul 9, 2020

Thanks for reporting.

This is a duplicate of #10586 and it has already been fixed in the master branch.

@geoand geoand closed this as completed Jul 9, 2020
@geoand geoand added the triage/duplicate This issue or pull request already exists label Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/container-image kind/bug Something isn't working triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants