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 + Dev Services + Testcontainers not working with podman on macOS #22919

Closed
haf-tech opened this issue Jan 15, 2022 · 9 comments
Closed
Labels
area/devservices kind/bug Something isn't working

Comments

@haf-tech
Copy link

haf-tech commented Jan 15, 2022

Describe the bug

Usage of Dev Services in Quarkus on macOS with podman is not successful.
Either the docker daemon and cli is expected
or docker.sock is not available or accessible
or some space issues

Expected behavior

Quarkus with Dev Services working on macOS with podman

Actual behavior

create a SSH tunnel to the sock

# ssh -i ~/.ssh/podman-machine-default -p 53953 -L'/tmp/podman.sock:/run/user/1000/podman/podman.sock' -N core@localhost

export some env variables

export DOCKER_HOST=unix:////tmp/podman.sock
export TESTCONTAINERS_CHECKS_DISABLE=true
export TESTCONTAINERS_RYUK_DISABLED=true

./mvnw compile quarkus:dev

2 possible stacktraces
a) no Docker env found

2022-01-15 18:04:37,629 DEBUG [org.tes.uti.TestcontainersConfiguration] (build-17) Testcontainers configuration overrides will be loaded from file:/Users/haddouti/.testcontainers.properties
2022-01-15 18:04:37,639 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-17) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2022-01-15 18:04:37,642 DEBUG [org.tes.doc.DockerClientProviderStrategy] (build-17) Trying out strategy: EnvironmentAndSystemPropertyClientProviderStrategy
2022-01-15 18:04:42,749 DEBUG [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.io.PoolingHttpClientConnectionManager] (build-17) Shutdown connection pool GRACEFUL
2022-01-15 18:04:42,754 DEBUG [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.io.PoolingHttpClientConnectionManager] (build-17) Connection pool shut down
2022-01-15 18:04:42,757 DEBUG [org.tes.doc.DockerClientProviderStrategy] (build-17) EnvironmentAndSystemPropertyClientProviderStrategy: failed with exception TimeoutException (Timeout waiting for result with exception). Root cause LastErrorException ([61] Connection refused)
2022-01-15 18:04:42,762 DEBUG [org.tes.doc.DockerClientProviderStrategy] (build-17) Trying out strategy: UnixSocketClientProviderStrategy
2022-01-15 18:04:42,765 DEBUG [org.tes.doc.DockerClientProviderStrategy] (build-17) UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
2022-01-15 18:04:42,769 INFO  [org.tes.doc.DockerMachineClientProviderStrategy] (build-17) docker-machine executable was not found on PATH ([/usr/local/bin, /usr/bin, /bin, /usr/sbin, /sbin, /usr/local/go/bin, /usr/local/share/dotnet, /opt/X11/bin, ~/.dotnet/tools])
2022-01-15 18:04:42,771 ERROR [org.tes.doc.DockerClientProviderStrategy] (build-17) Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
2022-01-15 18:04:42,772 ERROR [org.tes.doc.DockerClientProviderStrategy] (build-17)     EnvironmentAndSystemPropertyClientProviderStrategy: failed with exception TimeoutException (Timeout waiting for result with exception). Root cause LastErrorException ([61] Connection refused)
2022-01-15 18:04:42,773 ERROR [org.tes.doc.DockerClientProviderStrategy] (build-17)     UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
2022-01-15 18:04:42,774 ERROR [org.tes.doc.DockerClientProviderStrategy] (build-17) As no valid configuration was found, execution cannot continue
2022-01-15 18:04:42,884 DEBUG [io.qua.dep.uti.ExecUtil] (build-17) docker version 3.4.4
2022-01-15 18:04:43,670 DEBUG [io.qua.dep.IsDockerWorking] (build-17) Docker daemon found. Version: '3.4.0'
2022-01-15 18:04:43,680 TRACE [io.qua.builder] (build-17) Finished step "io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor#startKafkaDevService" in 6072 ms
2022-01-15 18:04:43,680 TRACE [io.qua.builder] (build-17) Dependency of "io.quarkus.deployment.steps.DevServicesConfigBuildStep#setup" finished; 0 remaining
2022-01-15 18:04:43,681 TRACE [io.qua.builder] (build-38) Starting step "io.quarkus.deployment.steps.DevServicesConfigBuildStep#setup"
2022-01-15 18:04:43,681 TRACE [io.qua.builder] (build-38) Finished step "io.quarkus.deployment.steps.DevServicesConfigBuildStep#setup" in 0 ms
2022-01-15 18:04:43,682 TRACE [io.qua.builder] (build-38) Dependency of "io.quarkus.vertx.http.deployment.devmode.console.ConfigEditorProcessor#handleRequests" finished; 0 remaining
2022-01-15 18:04:43,682 TRACE [io.qua.builder] (build-38) Dependency of "io.quarkus.swaggerui.deployment.SwaggerUiProcessor#getSwaggerUiFinalDestination" finished; 0 remaining
2022-01-15 18:04:43,682 TRACE [io.qua.builder] (build-38) Dependency of "io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor#runtimeTemplates" finished; 3 remaining
...
...


2022-01-15 18:04:43,754 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2022-01-15 18:04:43,839 INFO  [org.jbo.threads] (main) JBoss Threads version 3.4.2.Final
2022-01-15 18:04:43,941 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.kafka.client.deployment.DevServicesKafkaProcessor#startKafkaDevService threw an exception: java.lang.RuntimeException: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
	at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:114)
	at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:146)
	at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:188)
	at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:101)
	at com.github.dockerjava.api.DockerClientDelegate.listContainersCmd(DockerClientDelegate.java:187)
	at io.quarkus.devservices.common.ContainerLocator.lookup(ContainerLocator.java:32)
	at io.quarkus.devservices.common.ContainerLocator.locateContainer(ContainerLocator.java:45)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:228)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:103)
	... 11 more

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:93)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:456)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:67)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:105)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor#startKafkaDevService threw an exception: java.lang.RuntimeException: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
	at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:114)
	at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:146)
	at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:188)
	at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:101)
	at com.github.dockerjava.api.DockerClientDelegate.listContainersCmd(DockerClientDelegate.java:187)
	at io.quarkus.devservices.common.ContainerLocator.lookup(ContainerLocator.java:32)
	at io.quarkus.devservices.common.ContainerLocator.locateContainer(ContainerLocator.java:45)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:228)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:103)
	... 11 more

	at io.quarkus.builder.Execution.run(Execution.java:116)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:328)
	... 9 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
	at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:114)
	at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:146)
	at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:188)
	at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:101)
	at com.github.dockerjava.api.DockerClientDelistContainersCmd(DockerClientDelegate.java:187)
	at io.quarkus.devservices.common.ContainerLocator.lookup(ContainerLocator.java:32)
	at io.quarkus.devservices.common.ContainerLocator.locateContainer(ContainerLocator.java:45)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:228)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:103)
	... 11 more


b) no space left

2022-01-15 17:48:20,706 TRACE [org.jbo.threads] (build-20) Thread "Thread[build-20,5,build group]" exiting
2022-01-15 17:48:20,745 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2022-01-15 17:48:20,837 INFO  [org.jbo.threads] (main) JBoss Threads version 3.4.2.Final
2022-01-15 17:48:20,944 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.kafka.client.deployment.DevServicesKafkaProcessor#startKafkaDevService threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:336)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:317)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.lambda$startKafka$5(DevServicesKafkaProcessor.java:240)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:248)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:103)
	... 11 more
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/vectorized/redpanda:v21.5.5, imagePullPolicy=DefaultPullPolicy())
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1326)
	at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:643)
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:326)
	... 16 more
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"cause":"open /var/tmp/700274017: no space left on device","message":"Failed transform image summaries: failed to obtain summary for image 14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab: open /var/tmp/700274017: no space left on device","response":500}

	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.ListImagesCmdExec.execute(ListImagesCmdExec.java:41)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.ListImagesCmdExec.execute(ListImagesCmdExec.java:16)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
	at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
	at org.testcontainers.images.LocalImagesCache.maybeInitCache(LocalImagesCache.java:68)
	at org.testcontainers.images.LocalImagesCache.get(LocalImagesCache.java:32)
	at org.testcontainers.images.AbstractImagePullPolicy.shouldPull(AbstractImagePullPolicy.java:18)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:67)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:28)
	at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17)
	at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39)
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1324)
	... 18 more

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:93)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:456)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:67)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:105)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor#startKafkaDevService threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:336)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:317)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.lambda$startKafka$5(DevServicesKafkaProcessor.java:240)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:248)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:103)
	... 11 more
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/vectorized/redpanda:v21.5.5, imagePullPolicy=DefaultPullPolicy())
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1326)
	at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:643)
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:326)
	... 16 more
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"cause":"open /var/tmp/700274017: no space left on device","message":"Failed transform image summaries: failed to obtain summary for image 14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab: open /var/tmp/700274017: no space left on device","response":500}

	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.ListImagesCmdExec.execute(ListImagesCmdExec.java:41)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.ListImagesCmdExec.execute(ListImagesCmdExec.java:16)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
	at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
	at org.testcontainers.images.LocalImagesCache.maybeInitCache(LocalImagesCache.java:68)
	at org.testcontainers.images.LocalImagesCache.get(LocalImagesCache.java:32)
	at org.testcontainers.images.AbstractImagePullPolicy.shouldPull(AbstractImagePullPolicy.java:18)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:67)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:28)
	at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17)
	at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39)
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1324)
	... 18 more

	at io.quarkus.builder.Execution.run(Execution.java:116)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:328)
	... 9 more
Caused by: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:336)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:317)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.lambda$startKafka$5(DevServicesKafkaProcessor.java:240)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:248)
	at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:103)
	... 11 more
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/vectorized/redpanda:v21.5.5, imagePullPolicy=DefaultPullPolicy())
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1326)
	at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:643)
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:326)
	... 16 more
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"cause":"open /var/tmp/700274017: no space left on device","message":"Failed transform image summaries: failed to obtain summary for image 14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab: open /var/tmp/700274017: no space left on device","response":500}

	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.ListImagesCmdExec.execute(ListImagesCmdExec.java:41)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.ListImagesCmdExec.execute(ListImagesCmdExec.java:16)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
	at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
	at org.testcontainers.images.LocalImagesCache.maybeInitCache(LocalImagesCache.java:68)
	at org.testcontainers.images.LocalImagesCache.get(LocalImagesCache.java:32)
	at org.testcontainers.images.AbstractImagePullPolicy.shouldPull(AbstractImagePullPolicy.java:18)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:67)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:28)
	at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17)
	at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39)
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1324)
	... 18 more

How to Reproduce?

see above

Output of uname -a or ver

Darwin Haf 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.6.2.Final

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

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)

Additional information

podman version
Client:
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.17.3
Built:        Wed Dec  8 19:41:11 2021
OS/Arch:      darwin/amd64

Server:
Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.16.8
Built:        Thu Sep 30 21:40:21 2021
OS/Arch:      linux/amd64

probably similar issue: #16541

FYI @myfear

@haf-tech haf-tech added the kind/bug Something isn't working label Jan 15, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 15, 2022

/cc @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Jan 17, 2022

@galderz IIRC, you have used podman with testcontainers, right?

@galderz
Copy link
Member

galderz commented Jan 27, 2022

@geoand You meant to ping someone else? Guillaume?

@geoand
Copy link
Contributor

geoand commented Jan 27, 2022

Nope, I meant you 😃. I thought you use podman

@galderz
Copy link
Member

galderz commented Jan 31, 2022

Hmmm, don't think I've ever used podman on macos before. IIRC Jason/Stuart did some experiments on that combo but don't know what came out of that.

@holly-cummins
Copy link
Contributor

holly-cummins commented Jun 29, 2022

There are some podman-related fixes going in as part of #25230. For example, mongo dev services on podman had a case-sensitivity issue. I'm hoping we can also get M1 automated builds going, which will most likely use podman to ensure ongoing compatibility.

Here's my podman recipe:

Edit ~/.testcontainers.properties and add the following line

ryuk.container.privileged=true

Then run the following

brew install podman
podman machine init -v $HOME:$HOME
sudo /opt/homebrew/Cellar/podman/4.0.3/bin/podman-mac-helper install
podman machine set --rootful
podman machine start
podman machine ssh
sudo -i
rpm-ostree install qemu-user-static
systemctl reboot

Once the virtual machine restarts, you should be good to run dev services.

If you're podman 4.1 or higher, you don't need the the -v $HOME:$HOME volume mount. https://edofic.com/posts/2021-09-12-podman-m1-amd64/ explains the architecture part, and containers/podman#14238 has discussion of what's going on with ryuk.

@holly-cummins
Copy link
Contributor

holly-cummins commented Jun 29, 2022

(With the recipe above, kafka dev services is working with podman on mac for me. I haven't seen the 'no space' issue, though, so I don't know if it would have fixed that. That feels like another podman setting that maybe needs adjusting? Or perhaps a maven memory config?)

@agoncal
Copy link
Contributor

agoncal commented Mar 31, 2023

I'm using Quarkus 3.0.0.CR1 with Podman on Mac, and it works. Wonder if this issue is still relevant with the latest versions

@holly-cummins
Copy link
Contributor

I agree, I think it's overall-stale. There are issues with some particular dev services, but most paths work. We have (had) a CI build running with podman, and we have documentation on how to run Quarkus with podman on MacOS: https://quarkus.io/guides/podman#macos

I'll close. There's another umbrella item, #31253, which is tracking links to issues for the particular scenarios that don't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devservices kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants