Reputation: 1908
Adding container-image-docker causing the error:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker</artifactId>
</dependency>
Building an application to test IT, but getting an error:
./mvnw verify -Pnative -Dquarkus.container-image.build=true -Dquarkus.native.container-runtime=docker -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21
Unit Test run fine:
[INFO] Results:
[INFO]
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
Integration Tests fail:
2024-05-24 19:10:38,508 INFO [io.qua.tes.com.DefaultDockerContainerLauncher] (main) Executing "docker run --name quarkus-integration-test-fJhUI -i --rm -p 8081:8081 -p 8444:8444 --net=134bf9da3a66b67073dee2fd96b77442a412132d14bdace151c01c5c5b46c037 --env QUARKUS_LOG_CATEGORY__IO_QUARKUS__LEVEL=INFO --env QUARKUS_HTTP_PORT=8081 --env QUARKUS_HTTP_SSL_PORT=8444 --env TEST_URL=http://localhost:8081 --env QUARKUS_REDIS_HOSTS=redis://redis-3p9kt:6379 --env QUARKUS_NATIVE_CONTAINER_RUNTIME=docker --env QUARKUS_CONTAINER_IMAGE_BUILD=true --env QUARKUS_NATIVE_BUILDER_IMAGE=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 jm-service-dataservice:1.0.0-SNAPSHOT"
Waited 60 seconds for target/quarkus.log to contain info about the listening port and protocol but no such info was found. Check if the options quarkus.log.level and quarkus.log.file.level are at least INFO (or more verbose).
Failed to launch the application. The application logs can be found at: /path/to/dataservice-service/target/quarkus.log
WARNING: A Java agent has been loaded dynamically (/path/to/.m2/repository/net/bytebuddy/byte-buddy-agent/1.14.12/byte-buddy-agent-1.14.12.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 63.27 s <<< FAILURE! -- in com.johnmanko.service.dataservice.StatusResourceIT
[ERROR] com.johnmanko.service.dataservice.StatusResourceIT.getStatus -- Time elapsed: 0.402 s <<< ERROR!
java.lang.RuntimeException: java.lang.IllegalStateException: Unable to determine the status of the running process. See the above logs for details
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.throwBootFailureException(QuarkusIntegrationTestExtension.java:372)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.beforeEach(QuarkusIntegrationTestExtension.java:117)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: java.lang.IllegalStateException: Unable to determine the status of the running process. See the above logs for details
at io.quarkus.test.common.LauncherUtil.waitForCapturedListeningData(LauncherUtil.java:102)
at io.quarkus.test.common.DefaultDockerContainerLauncher.start(DefaultDockerContainerLauncher.java:179)
at io.quarkus.test.junit.IntegrationTestUtil.startLauncher(IntegrationTestUtil.java:195)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.doProcessStart(QuarkusIntegrationTestExtension.java:300)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.ensureStarted(QuarkusIntegrationTestExtension.java:169)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.postProcessTestInstance(QuarkusIntegrationTestExtension.java:327)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1709)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
... 1 more
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] StatusResourceIT.getStatus » Runtime java.lang.IllegalStateException: Unable to determine the status of the running process. See the above logs for details
[INFO]
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 1
[INFO]
[INFO]
[INFO] --- failsafe:3.2.5:verify (default) @ dataservice-service ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Quarkus log (./target/quarkus.log
):
docker: Error response from daemon: Could not attach to network 134bf9da3a66b67073dee2fd96b77442a412132d14bdace151c01c5c5b46c037: rpc error: code = NotFound desc = network 134bf9da3a66b67073dee2fd96b77442a412132d14bdace151c01c5c5b46c037 not found.
application.properties
:
%prod.quarkus.container-image.registry=my-repo
%prod.quarkus.container-image.group=
%prod.quarkus.container-image.name=my-service-data
%prod.quarkus.container-image.build=true
%prod.quarkus.native.container-build=true
%prod.quarkus.test.wait-time=30
%test.quarkus.docker.network=overlay
quarkus.rest.path=/api/v1
Removing %test.quarkus.docker.network=overlay
doesn't fix the problem (in fact, I added it to try and resolve it).
Upvotes: 0
Views: 86