Skip to content

Communicate with Ryuk over the Docker connection - #3521

Closed
bsideup wants to merge 8 commits into
masterfrom
ryuk_over_docker_connection
Closed

bsideup wants to merge 8 commits into
masterfrom
ryuk_over_docker_connection

Conversation

@bsideup

@bsideup bsideup commented Nov 24, 2020

Copy link
Copy Markdown
Member

Related to #3136

Comment thread core/src/main/java/org/testcontainers/utility/ResourceReaper.java Outdated
Co-authored-by: Richard North <rich.north@gmail.com>
if (!started.await(TestcontainersConfiguration.getInstance().getRyukTimeout(), TimeUnit.SECONDS)) {
log.error("Timed out waiting for Ryuk container to start. Ryuk's logs:\n{}", ryukLog);
throw new IllegalStateException(String.format("Could not connect to Ryuk at %s:%s", hostIpAddress, ryukPort));
throw new IllegalStateException("Could not connect to Ryuk");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we take the opportunity to make this clearer?
e.g.

Suggested change
throw new IllegalStateException("Could not connect to Ryuk");
throw new IllegalStateException("Timed out waiting for the Ryuk cleanup container to start");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe "watchdog container" instead of "cleanup container"?

@bsideup bsideup removed this from the 1.15.1 milestone Dec 8, 2020
@asafm

asafm commented Dec 16, 2020 •

Copy link
Copy Markdown
Contributor

@bsideup Sorry for late response - what's the trick again to try this commit as dependency?
Edit: Found it - jitpack!

@asafm

asafm commented Dec 18, 2020

Copy link
Copy Markdown
Contributor

@bsideup Ok, finally got some time to run it. If fails.

20/12/18 22:03:49.411 [testcontainers-ryuk] WARN o.t.u.ResourceReaper: Ryuk connection failure
java.lang.RuntimeException: java.net.SocketException: Socket closed
	at com.github.dockerjava.api.async.ResultCallbackTemplate.throwFirstError(ResultCallbackTemplate.java:158)
	at com.github.dockerjava.api.async.ResultCallbackTemplate.awaitCompletion(ResultCallbackTemplate.java:93)
	at org.testcontainers.utility.ResourceReaper.lambda$null$1(ResourceReaper.java:105)
	at org.testcontainers.utility.ResourceReaper$$Lambda$542/1971736492.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Socket closed
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
	at java.net.SocketInputStream.read(SocketInputStream.java:170)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at org.testcontainers.shaded.okio.Okio$2.read(Okio.java:140)
	at org.testcontainers.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
	at org.testcontainers.shaded.okio.RealBufferedSource.read(RealBufferedSource.java:51)
	at org.testcontainers.shaded.okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.java:389)
	at org.testcontainers.shaded.okhttp3.internal.http1.Http1ExchangeCodec$UnknownLengthSource.read(Http1ExchangeCodec.java:529)
	at org.testcontainers.shaded.okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.java:286)
	at org.testcontainers.shaded.okio.RealBufferedSource$1.read(RealBufferedSource.java:436)
	at org.testcontainers.shaded.com.github.dockerjava.core.FramedInputStreamConsumer.accept(FramedInputStreamConsumer.java:30)
	at org.testcontainers.shaded.com.github.dockerjava.core.FramedInputStreamConsumer.accept(FramedInputStreamConsumer.java:12)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:275)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder$$Lambda$380/664856708.run(Unknown Source)
	... 1 common frames omitted

on java.lang.RuntimeException: java.lang.IllegalStateException: Timed out waiting for the default Ryuk filters to be registered

I'll try to work on this some more to figure out why the socket was closed. I think it's the DockerClient socket.

@bsideup

bsideup commented Feb 6, 2021

Copy link
Copy Markdown
Member Author

Going to rework

@bsideup bsideup closed this Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants