quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

AMQP-Devservices: `quay.io/artemiscloud/activemq-artemis-broker:1.0.22` does not start #36190

Closed mschorsch closed 1 year ago

mschorsch commented 1 year ago

Describe the bug

In one of our projects, we use the amqp dev services to start an quay.io/artemiscloud/activemq-artemis-broker. With version 1.0.22 we get the following exception, version 1.0.21 starts normally:

2023-09-28 08:46:27,641 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-4) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2023-09-28 08:46:27,925 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-4) Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
2023-09-28 08:46:27,928 INFO  [org.tes.DockerClientFactory] (build-4) Docker host IP address is localhost
2023-09-28 08:46:27,948 INFO  [org.tes.DockerClientFactory] (build-4) Connected to docker: 
  Server Version: 20.10.12
  API Version: 1.41
  Operating System: Ubuntu 22.04.3 LTS
  Total Memory: 31969 MB
2023-09-28 08:46:27,962 INFO  [org.tes.uti.ImageNameSubstitutor] (build-4) Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
2023-09-28 08:46:27,967 INFO  [org.tes.DockerClientFactory] (build-4) Checking the system...
2023-09-28 08:46:27,969 INFO  [org.tes.DockerClientFactory] (build-4) ✔︎ Docker server version should be at least 1.6.0
2023-09-28 08:46:28,122 INFO  [tc.art.example.com/.0.22] (build-4) Creating container for image: quay.io/artemiscloud/activemq-artemis-broker:1.0.22
2023-09-28 08:46:28,140 INFO  [org.tes.uti.ImageNameSubstitutor] (build-4) Using quay.io/testcontainers/ryuk:0.5.1 as a substitute image for testcontainers/ryuk:0.5.1 (using image substitutor: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor'))
2023-09-28 08:46:28,141 INFO  [tc.art.example.com/.5.1] (build-4) Creating container for image: quay.io/testcontainers/ryuk:0.5.1
2023-09-28 08:46:28,265 INFO  [tc.art.example.com/.5.1] (build-4) Container quay.io/testcontainers/ryuk:0.5.1 is starting: 2bace4b39dfe450c921c1fc5eab39ad0c2e5199369d0db72f38f0e67eebb3e1e
2023-09-28 08:46:29,081 INFO  [tc.art.example.com/.5.1] (build-4) Container quay.io/testcontainers/ryuk:0.5.1 started in PT0.941344434S
2023-09-28 08:46:29,225 INFO  [tc.art.example.com/.0.22] (build-4) Container quay.io/artemiscloud/activemq-artemis-broker:1.0.22 is starting: c12a058f8f7bfdba5e83c1a9f80ed35d73cfb4f166e5125d3b13dedd36353a4d
2023-09-28 08:47:29,744 ERROR [tc.art.example.com/.0.22] (build-4) Could not start container: java.lang.IllegalStateException: Wait strategy failed. Container exited with code 1
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:523)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.lambda$startAmqpBroker$1(AmqpDevServicesProcessor.java:193)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpBroker(AmqpDevServicesProcessor.java:202)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:97)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for log output matching '.*AMQ241004.*'
        at org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy.waitUntilReady(LogMessageWaitStrategy.java:47)
        at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
        at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:964)
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:490)
        ... 19 more

2023-09-28 08:47:29,771 ERROR [tc.art.example.com/.0.22] (build-4) Log output from the failed container:
Creating Broker with args --user XXXXX --password XXXXX --role admin --name broker --allow-anonymous --http-host 172.17.0.3 --host 172.17.0.3   --force --no-autotune --mapped --no-fsync --relax-jolokia --http-host 0.0.0.0

option '--http-host' (<httpHost>) should be specified only once
Usage: artemis help [<args>...]
use 'help <command>' for more information
      [<args>...]

2023-09-28 08:47:29,778 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2023-09-28 08:47:30,119 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor#startAmqpDevService threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/artemiscloud/activemq-artemis-broker:1.0.22
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:109)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/artemiscloud/activemq-artemis-broker:1.0.22
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.lambda$startAmqpBroker$1(AmqpDevServicesProcessor.java:193)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpBroker(AmqpDevServicesProcessor.java:202)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:97)
        ... 11 more
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
        ... 16 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:553)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        ... 17 more
Caused by: java.lang.IllegalStateException: Wait strategy failed. Container exited with code 1
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:523)
        ... 19 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for log output matching '.*AMQ241004.*'
        at org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy.waitUntilReady(LogMessageWaitStrategy.java:47)
        at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
        at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:964)
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:490)
        ... 19 more

        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:336)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:253)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:113)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:438)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:56)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:138)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor#startAmqpDevService threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/artemiscloud/activemq-artemis-broker:1.0.22
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:109)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/artemiscloud/activemq-artemis-broker:1.0.22
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.lambda$startAmqpBroker$1(AmqpDevServicesProcessor.java:193)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpBroker(AmqpDevServicesProcessor.java:202)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:97)
        ... 11 more
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
        ... 16 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:553)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        ... 17 more
Caused by: java.lang.IllegalStateException: Wait strategy failed. Container exited with code 1
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:523)
        ... 19 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for log output matching '.*AMQ241004.*'
        at org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy.waitUntilReady(LogMessageWaitStrategy.java:47)
        at org.testcontainers.containers.wait.strategy.tWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
        at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:964)
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:490)
        ... 19 more

        at io.quarkus.builder.Execution.run(Execution.java:123)
        at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:332)
        ... 9 more
Caused by: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/artemiscloud/activemq-artemis-broker:1.0.22
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:109)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/artemiscloud/activemq-artemis-broker:1.0.22
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.lambda$startAmqpBroker$1(AmqpDevServicesProcessor.java:193)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpBroker(AmqpDevServicesProcessor.java:202)
        at io.quarkus.smallrye.reactivemessaging.amqp.deployment.AmqpDevServicesProcessor.startAmqpDevService(AmqpDevServicesProcessor.java:97)
        ... 11 more
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
        ... 16 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:553)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        ... 17 more
Caused by: java.lang.IllegalStateException: Wait strategy failed. Container exited with code 1
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:523)
        ... 19 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for log output matching '.*AMQ241004.*'
        at org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy.waitUntilReady(LogMessageWaitStrategy.java:47)
        at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
        at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:964)

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

Ubuntu 22.04.3 LTS

Output of java -version

Java 17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.4.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Maven

Additional information

No response

quarkus-bot[bot] commented 1 year ago

/cc @geoand (devservices), @stuartwdouglas (devservices)

geoand commented 1 year ago

@cescoffier any idea who we should ping about this?

cescoffier commented 1 year ago

@geoand No, not really. I was afraid one day they would change the parameters.

I would recommend configuring the extra-args to:

quarkus.amqp.devservices.exta-args=--no-autotune --mapped --no-fsync --relax-jolokia
mschorsch commented 1 year ago

@geoand No, not really. I was afraid one day they would change the parameters.

I would recommend configuring the extra-args to:

quarkus.amqp.devservices.exta-args=--no-autotune --mapped --no-fsync --relax-jolokia

Unfortunately, this does not seem to fix the problem.

cescoffier commented 1 year ago

Just tested it works.... without the typo:

quarkus.amqp.devservices.extra-args=--no-autotune --mapped --no-fsync --relax-jolokia
mschorsch commented 1 year ago

Just tested it works.... without the typo:

quarkus.amqp.devservices.extra-args=--no-autotune --mapped --no-fsync --relax-jolokia

Thanks @cescoffier. I can confirm that it works without the typo 👍