Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podman Becomes Unresponsive During Test Execution on Windows #24798

Open
mukul-tyagi opened this issue Dec 9, 2024 · 1 comment
Open

Podman Becomes Unresponsive During Test Execution on Windows #24798

mukul-tyagi opened this issue Dec 9, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine windows issue/bug on Windows

Comments

@mukul-tyagi
Copy link

mukul-tyagi commented Dec 9, 2024

Issue Description

I'm encountering an issue where Podman becomes unresponsive during the execution of unit tests that utilize the Testcontainers library on a Windows system. The following behavior is observed:

  • Initial Execution: Podman works as expected, and containers are created and managed successfully.
  • Mid-Execution: After a certain number of tests, Podman starts exhibiting unresponsive behavior.
  • Container Inaccessibility: Containers created during the test execution become unreachable.
  • Podman Commands Fail: Commands like podman ps -a fail with the error: Cannot connect to Podman. Please verify your connection to the Linux system usingpodman system connection list, or trypodman machine initandpodman machine startto manage a new Linux VM. Error: unable to connect to Podman socket: failed to connect: ssh: handshake failed: read tcp 127.0.0.1:58815->127.0.0.1:58563: wsarecv: An existing connection was forcibly closed by the remote host.
    Test Failures: Test cases that rely on containers fail due to the inability to connect to the containers.
    Additional Information:

Error Message: Caused by: com.mongodb.MongoTimeoutException: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:44229, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message}, caused by {io.netty.handler.timeout.ReadTimeoutException}}]
System Setup: Windows 10/11, Podman 5.3.1, Testcontainers 1.20.3

Even I tried to below configs thorough containers.conf file:

[containers]
host_containers_internal_ip="none"
[netowork]
network_backend="netavark"
default_network="bridge"
[engine]
enable_port_reservation=true
events_logfile_path="./testPodman.txt"
service_timeout=0
exit_command_delay=0

Note:- I would like to mention that if run these test cases with docker setup, everything runs perfectly

Steps to reproduce the issue

NA

Describe the results you received

Error Message: Caused by: com.mongodb.MongoTimeoutException: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:44229, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message}, caused by {io.netty.handler.timeout.ReadTimeoutException}}]

After this If I stop the machine and starts then it gives below logs

$ podman machine start
Starting machine "podman-machine-default"
API forwarding for Docker API clients is not available due to the following startup failures.
        CreateFile \\.\pipe\docker_engine: All pipe instances are busy.

Podman clients are still able to connect.

If I restart the system then it starts normally

$ podman machine start
Starting machine "podman-machine-default"
API forwarding listening on: npipe:////./pipe/docker_engine
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully

Describe the results you expected

It should have executed successfully as it is working fine with docker

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Running in windows 11 with Podman 5.3.1, Testcontainers 1.20.3

Additional information

If I connects with podman-machine-default using wsl wsl -d podman-machine-default then I could see that containers are up and running but still from windows(where tests are running) it is not able to connect with podman machine and says time out exception.

Note:- It also works(tests works fine) in ubuntu with podman so issue seems to be with podman on windows

@mukul-tyagi mukul-tyagi added the kind/bug Categorizes issue or PR as related to a bug. label Dec 9, 2024
@Luap99 Luap99 added machine windows issue/bug on Windows labels Dec 12, 2024
@mukul-tyagi
Copy link
Author

Hi @Luap99 , Any updates or insights would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

2 participants