[Bug]: After Podman 5.x to 6.x our tests started failing when running more then one

オープン
#12,112 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, java

調査の方向性

Start with the generated testcontainers.properties, which selects NpipeSocketClientProviderStrategy on Windows, and compare it with the DOCKER_HOST unix socket set on each MSSQLServerContainer in the reporter's base class. The failure is a NoHttpResponseException from localhost:2375 when a second container starts, so trace how the client strategy is chosen. Done means several MSSQLServer containers start in one run against Podman 6.1.4 on Windows.

索引モデルが issue の本文から書いたものです。

説明

type/bug
Module

MSSQLServer

Testcontainers version

2.0.5

Using the latest Testcontainers version?

Yes

Host OS

Windows

Host Arch

x86-64

Docker version
Client:       Podman Engine
Version:      6.1.4
API Version:  6.1.4
Go Version:   go1.26.8
Git Commit:   464c15fec06f0074c916f9eff87c4806869c2833
Built:        Mon Oct 12 22:55:21 2026
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      6.1.4
API Version:  6.1.4
Go Version:   go1.26.9-X:nodwarf5
Git Commit:   464c15fec06f0074c916f9eff87c4806869c2833
Built:        Mon Oct 12 02:00:00 2026
OS/Arch:      linux/amd64
What happened?

We made following base class

@SpringBootTest
@Testcontainers
@TestPropertySource(properties = {"spring.config.location=classpath:application-testcontainer.yaml"})
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
public abstract class AbstractTestcontainerTest {

    @Container
    private static final MSSQLServerContainer levoContainer = new MSSQLServerContainer(
            DockerImageName.parse("mcr.microsoft.com/mssql/server:2022-latest")
    ).withEnv("DOCKER_HOST", "unix:///run/podman/podman.sock");

    @Container
    private static final MSSQLServerContainer transferContainer = new MSSQLServerContainer(
            DockerImageName.parse("mcr.microsoft.com/mssql/server:2022-latest")
    ).withEnv("DOCKER_HOST", "unix:///run/podman/podman.sock");

    @Container
    private static final MSSQLServerContainer appContainer = new MSSQLServerContainer(
            DockerImageName.parse("mcr.microsoft.com/mssql/server:2022-latest")
    ).withEnv("DOCKER_HOST", "unix:///run/podman/podman.sock");

    @DynamicPropertySource
    static void setProperties(DynamicPropertyRegistry registry) {
        registry.add("levo.jdbc", levoContainer::getJdbcUrl);
        registry.add("transfer.jdbc", transferContainer::getJdbcUrl);
        registry.add("app.jdbc", appContainer::getJdbcUrl);
    }
}

Our tests extends this and before in podman 5 all these tests where working normally. After the upgrade to podman 6 if we have more then one enabled the second one always fails

16:20:39.476 [main] INFO  o.s.t.c.s.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [be.delijn.leerlingenvervoerbatch.application.jobs.facturatie.FacturatieMaandCreatieIntegrationTestDb]: FacturatieMaandCreatieIntegrationTestDb does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 
16:20:39.478 [main] INFO  o.s.b.t.c.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration be.delijn.leerlingenvervoerbatch.application.LeerlingenvervoerBatchApplication for test class be.delijn.leerlingenvervoerbatch.application.jobs.facturatie.FacturatieMaandCreatieIntegrationTestDb 
16:20:39.479 [main] INFO  o.s.t.c.s.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [be.delijn.leerlingenvervoerbatch.application.jobs.facturatie.FacturatieMaandCreatieIntegrationTestDb]: FacturatieMaandCreatieIntegrationTestDb does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 
16:20:39.480 [main] INFO  o.s.t.c.s.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [be.delijn.leerlingenvervoerbatch.application.AbstractTestcontainerTest]: AbstractTestcontainerTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 
16:20:39.481 [main] INFO  o.s.b.t.c.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration be.delijn.leerlingenvervoerbatch.application.LeerlingenvervoerBatchApplication for test class be.delijn.leerlingenvervoerbatch.application.jobs.facturatie.FacturatieMaandCreatieIntegrationTestDb 
16:20:39.483 [main] INFO  t.m.m.com/mssql/server:2022-latest - Creating container for image: mcr.microsoft.com/mssql/server:2022-latest 
16:20:39.485 [main] ERROR t.m.m.com/mssql/server:2022-latest - Could not start container 
java.lang.RuntimeException: com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.NoHttpResponseException: localhost:2375 failed to respond
	at com.github.dockerjava.zerodep.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:193)
	at com.github.dockerjava.zerodep.ZerodepDockerHttpClient.execute(ZerodepDockerHttpClient.java:8)
	at org.testcontainers.dockerclient.HeadersAddingDockerHttpClient.execute(HeadersAddingDockerHttpClient.java:23)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.post(DefaultInvocationBuilder.java:124)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:37)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateContainerCmdExec.execute(CreateContainerCmdExec.java:13)
	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:33)
	at org.testcontainers.shaded.com.github.dockerjava.core.command.CreateContainerCmdImpl.exec(CreateContainerCmdImpl.java:608)
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:425)
	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:341)
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:331)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:317)
	at org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter.start(TestcontainersExtension.java:276)
	at org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter.access$200(TestcontainersExtension.java:263)
	at org.testcontainers.junit.jupiter.TestcontainersExtension.lambda$startContainers$4(TestcontainersExtension.java:83)
Caused by: com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.NoHttpResponseException: localhost:2375 failed to respond

AI isn't able to help me further one bit and I'm running out of ideas

this is my testcontainers.properties (always generated by the unit test each time I run it)

#Modified by Testcontainers
#Thu Oct 15 14:54:14 CEST 2026
docker.client.strategy=org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy

any help or direction would be wildly appreciated cause atm we are disabling our tests which is a real issue for the project in the long term

Relevant log output

Additional Information

No response

主要言語
Java
スター
8.8k
フォーク
2k
平均マージ
5日 21時間
マージ済み PR(30日)
15

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

testcontainers/testcontainers-java のほかの issue

testcontainers/testcontainers-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。