Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kokosing
Copy link
Member

@kokosing kokosing commented May 7, 2020

No description provided.

@cla-bot cla-bot bot added the cla-signed label May 7, 2020
@kokosing kokosing added the WIP label May 7, 2020
@kokosing
Copy link
Member Author

kokosing commented May 7, 2020

Currently when trying to run presto CLI on existing and running environment it fails with:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.testcontainers.containers.ContainerLaunchException: Container startup failed
        at io.prestosql.tests.product.launcher.env.Environment.start(Environment.java:64)
        at io.prestosql.tests.product.launcher.cli.EnvironmentCommandExecution.run(EnvironmentCommandExecution.java:67)
        at io.prestosql.tests.product.launcher.cli.PrestoCli$Execution.run(PrestoCli.java:119)
        at io.prestosql.tests.product.launcher.cli.Commands.runCommand(Commands.java:40)
        at io.prestosql.tests.product.launcher.cli.PrestoCli.run(PrestoCli.java:62)
        at io.prestosql.tests.product.launcher.cli.Launcher.run(Launcher.java:53)
        at com.starburstdata.presto.tests.product.launcher.cli.StarburstLauncher.main(StarburstLauncher.java:38)
Caused by: java.util.concurrent.ExecutionException: org.testcontainers.containers.ContainerLaunchException: Container startup failed
        at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
        at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
        at io.prestosql.tests.product.launcher.env.Environment.start(Environment.java:57)
        ... 6 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:322)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:302)
        at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:705)
        at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:687)
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
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:315)
        ... 7 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:485)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:317)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        ... 8 more
Caused by: java.lang.NullPointerException: networkMode was not specified
        at org.testcontainers.shaded.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228)
        at com.github.dockerjava.core.command.CreateContainerCmdImpl.withNetworkMode(CreateContainerCmdImpl.java:592)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testcontainers.dockerclient.AuditLoggingDockerClient.lambda$wrappedCommand$14(AuditLoggingDockerClient.java:110)
        at com.sun.proxy.$Proxy32.withNetworkMode(Unknown Source)
        at org.testcontainers.containers.GenericContainer.applyConfiguration(GenericContainer.java:797)
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:351)
        ... 10 more

@bsideup Does
testcontainers/testcontainers-java#1781 allow to reuse containers that share network? In other words is it possible to reuse docker network created by testcontainers?

@bsideup
Copy link

bsideup commented May 7, 2020

@kokosing it does not, since networks get a random ID. We have some ideas how to support "container sets" that can be reused, but it is not currently implemented.

@kokosing
Copy link
Member Author

kokosing commented May 7, 2020

it is not currently implemented.

@bsideup Thanks. That was my impression.

@findepi
Copy link
Member

findepi commented May 7, 2020

@kokosing
maybe we don't need to attach to an existing network?
maybe we execute the CLI inside the coordinator container directly?
coordinator because it always exists and always has all necessary files

We don't need to provide CLI in the container at startup time, we can add on the fly.

@iirekm
Copy link

iirekm commented Aug 14, 2020

It looks like a subtask of #4514 - waiting for PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants