question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors on Kubernetes 1.23 (with containerd as container runtime)

See original GitHub issue

Hi there!

Since Kubernetes 1.20, Docker support is deprecated and will be totally removed from 1.24. We use GKE to manage Kubernetes so the upgrade will be done automatically.

As far as I’ve read, developers should not have been impacted but we made tests in Kubernetes 1.23 to check that all is OK and it seems we have some issues with a microservice using Testcontainers :

09:59:44.578 [testcontainers-ryuk] WARN org.testcontainers.utility.ResourceReaper - Can not connect to Ryuk at localhost:49153
java.net.ConnectException: Connection refused (Connection refused)
	at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at org.testcontainers.utility.ResourceReaper.lambda$null$3(ResourceReaper.java:194)
	at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27)
	at org.testcontainers.utility.ResourceReaper.lambda$start$4(ResourceReaper.java:190)
	at java.base/java.lang.Thread.run(Thread.java:835)

This is not reproductible on a Kubernetes 1.19 where Docker is not deprecated nor removed.

We tried to disable Ryuk in pom.xml (as indicated for this error this issue) but it has no effect :

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>verify</goal>
                <goal>integration-test</goal>
            </goals>
            <configuration>
                <environmentVariables>
                    <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
                </environmentVariables>
            </configuration>
        </execution>
    </executions>
</plugin>

Is anyone have an idea please?

Thank you by advance!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fdelbrayellecommented, Mar 28, 2022

Solved by putting this in our configuration:

- name: "TESTCONTAINERS_HOST_OVERRIDE"
  valueFrom:
    fieldRef:
      fieldPath: status.hostIP

Following this doc:

    TESTCONTAINERS_HOST_OVERRIDE
    Docker's host on which ports are exposed.
    Example: docker.svc.local
1reaction
kiviewcommented, Mar 24, 2022

It might be the case that we see very different issues here, so we should be careful to not mix things up.

Testcontainers interacts with Docker using the Docker Engine RESTful API. If another container engine is used, an appropriate API needs to be configured and made accessible for Testcontainers, if it is running in a location that differs from the default Docker location.

Here is the part from our docs, that explains how to manually configure Testcontainers to interact with a Docker Engine-like RESTful API that does not get automatically detected: https://www.testcontainers.org/features/configuration/#customizing-docker-host-detection

So to everyone observing problems with their setups, how is your API accessible from the process that is running the tests?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Container Runtimes - Kubernetes
This page provides an outline of how to use several common container runtimes with Kubernetes. containerd; CRI-O; Docker Engine; Mirantis ...
Read more >
Troubleshooting the container runtime - Google Cloud
This document provides troubleshooting steps for common issues that you might encounter with the container runtime on your Google Kubernetes Engine (GKE) ...
Read more >
Kubernetes 1.23 - What's new? - New features and deprecations
Kubernetes 1.23 brings 50 enhancement, including improved support for ... containers and pods from the Container Runtime Interface (CRI), ...
Read more >
Components of Charmed Kubernetes 1.23 - Ubuntu
Charm to enable GCP integrations via Juju relations. docs · source · bugs, 166, --. kata, Kata untrusted container runtime subordinate, docs ·...
Read more >
Kubernetes and container runtimes - Splunk Documentation
Multiple container runtimes such as containerd, CRI-O, Docker, and Mirantis Kubernetes Engine (formerly ... k8s.node.network.errors{direction="receive"}.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found