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

Abierto
#12,112 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
15/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, java

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Java
Estrellas
8.8k
Forks
2k
Merge medio
5 d 21 h
PR fusionados (30 d)
15

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de testcontainers/testcontainers-java

Todos los issues de testcontainers/testcontainers-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.