testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

[Bug]: Broken pipe when creating container with podman

Open Sgitario opened this issue 2 years ago • 2 comments

Module

Core

Testcontainers version

1.18.3

Using the latest Testcontainers version?

Yes

Host OS

Linux

Host Arch

x86

Docker version

podman version is 4.6.2

What happened?

This is a duplicate of https://github.com/testcontainers/testcontainers-java/issues/6640 that was closed but not fixed (I can't reopen it). For example, using the PostgreSQL container like:

@Testcontainers
class MyTest {
  @Container
  static PostgreSQLContainer db = new PostgreSQLContainer();
  @Test
  void test() {
     // ....
  }
}

Will randomly fail with Broken pipe when creating container.

I configured podman-docker and socket using:

sudo dnf install podman podman-docker
systemctl --user enable podman.socket --now
podman system service --time=0

Check podman socket is listening:

podman info | grep -A2 'remoteSocket' 

This command should print:

remoteSocket:
  exists: true
  path: /path/to/podman.sock

And configure testcontainers to connect to the podman socket:

export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
export TESTCONTAINERS_RYUK_DISABLED=true

Relevant log output

No response

Additional Information

No response

Sgitario avatar Sep 20 '23 07:09 Sgitario

We are experiencing the same behavior on:

  • podman version 4.6.1
  • testcontainers 1.19.2

Using GenericContainer construct.

jvissers avatar Jan 18 '24 01:01 jvissers

In Quarkus QE we face with the same problem. Running on RHEL 8.9 with podman and testcontainers using GenericContainer construct.

  • podman version 4.6.1
  • testcontainers 1.19.3

gtroitsk avatar Jan 22 '24 13:01 gtroitsk

Experiencing this with:

  • TestContainers java 1.20.0
  • Podman 4.9.4-rhel
  • RockyLinux 8.8

nickbreen avatar Jul 31 '24 22:07 nickbreen

Please open an issue with Podman about this, I will close this issue, since we are only supporting Docker runtimes officially and expect other runtimes to behave in a similar way.

kiview avatar Aug 01 '24 14:08 kiview