podman icon indicating copy to clipboard operation
podman copied to clipboard

Cannot ssh into machine with networkingMode=mirrored

Open damlys99 opened this issue 1 year ago • 5 comments

Issue Description

After setting networkingMode=mirrored in .wslconfig I'm no longer able to use Podman. That happens only after upgrading Podman version 4.9.3 -> 5.0.3

I have HyperVFirewall disabled. What's unusual, after starting other WSL distro - ubuntu in other cmd, issues are disappearing, as that somehow triggers network to mirror

Steps to reproduce the issue

  1. Set networkingMode=Mirrored in .wslconfig
  2. wsl --shutdown
  3. podman machine start Error: machine did not transition into running state: ssh error: machine is not listening on ssh port
  4. "Bash" in cmd (starts Ubuntu - default distro for me)
  5. podman machine ssh - works

Describe the results you received

Starting machine "podman-machine-default" API forwarding for Docker API clients is not available due to the following startup failures. could not start api proxy since expected pipe is not available: podman-machine-default

Podman clients are still able to connect. Error: machine did not transition into running state: ssh error: machine is not listening on ssh port

podman machine ssh - timeouts but after starting Ubuntu with "Bash" in other cmd podman machine ssh - works, docker ps works etc.

Describe the results you expected

podman machine start podman machine ssh works

podman info output

Client:       Podman Engine
Version:      5.0.3
API Version:  5.0.3
Go Version:   go1.22.3
Git Commit:   d08315df35cb6e95f65bf3935f529295c6e54742
Built:        Fri May 10 20:02:40 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      5.0.3
API Version:  5.0.3
Go Version:   go1.22.2
Built:        Fri May 10 02:00:00 2024
OS/Arch:      linux/amd64

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

HyperV Firewall is disabled

.wslconfig

[wsl2]
networkingMode=mirrored
dnsTunneling=true
autoProxy=true

[experimental]
hostAddressLoopback=true

Additional information

No response

damlys99 avatar Jun 12 '24 07:06 damlys99

Right podman machine does not currently support mirrored mode (it needs different handling to do so)

n1hility avatar Jun 14 '24 16:06 n1hility

@n1hility I'd argue that it used to support mirrored networking, even podman 5.1 - however not with lastes machine version (see referenced issues) :)

POnakS avatar Jun 17 '24 09:06 POnakS

I noticed that when networkingMode=mirrored, running podman machine start will break the mirrored networking totally until a wsl --shutdown.

Reproduce step:

  1. Set networkingMode=mirrored
  2. Open a Ubuntu WSL shell and run sudo nginx
  3. Visit http://localhost in Windows and you'll get the nginx page
  4. Run podman machine start
  5. Visit http://localhost in Windows and you cannot connect to the server any more

Doing wsl --terminate podman-machine-default does not fix that. Don't know what part of podman is making this result.

taoyouh avatar Jun 18 '24 12:06 taoyouh

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Jul 19 '24 00:07 github-actions[bot]

@taoyouh this is probably caused by https://github.com/containers/podman/issues/20379

POnakS avatar Jul 19 '24 12:07 POnakS

Right podman machine does not currently support mirrored mode (it needs different handling to do so)

@n1hility Are there any plans to implement support for mirrored mode?

Narwhalrus avatar Dec 05 '24 15:12 Narwhalrus

Not sure what happened, but podman is running correctly with networkingMode=mirrored on my 2 computers now. One of them is using podman 5.3.1 and the other is using podman 5.3.2.

taoyouh avatar Apr 01 '25 10:04 taoyouh

hello, im have Podman Desktop 1.18 on windows 11, i have a podman started "podman version 5.4.2".

  • podman system connection list Name URI Identity Default ReadWrite podman-machine-default ssh://[email protected]:64540/run/user/1000/podman/podman.sock C:\Users\xxxxx.local\share\containers\podman\machine\machine true true podman-machine-default-root ssh://[email protected]:64540/run/podman/podman.sock C:\Users\xxxxx.local\share\containers\podman\machine\machine false true

when i try pull image with podman desktop and i have this message : Error while pulling image from podman-machine-default: socket hang up

marteloudini avatar May 08 '25 08:05 marteloudini