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 stop forwarding to Docker on windows when the the ssh conection is closed #24848

Open
jedla97 opened this issue Dec 16, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote

Comments

@jedla97
Copy link

jedla97 commented Dec 16, 2024

Issue Description

When I'm connected on my AWS windows machine via ssh and create and start podman machine I'm able to see the result of docker ps (using docker compose). When I'm exit the ssh connection and connect again the output of docker ps is

error during connect: Get "http://%2F%2F.%2Fpipe%2Fpodman-machine-default/v1.47/containers/json": open //./pipe/podman-machine-default: The system cannot find the file specified.

From this I get that somehow the connection to docker api is stop working. Tried to setup docker_host env but it still have same error.

What helped is to stop and start the podman machine.

We execute multiple files with commands where some of them use docker-compose and used by other machines when testing. So as we init the podman machine via ssh and execute different script by next ssh connection we stumble over that docker error.

Steps to reproduce the issue

Steps to reproduce the issue

  1. ssh to windows machine
  2. Invoke-WebRequest https://github.com/containers/podman/releases/download/v5.3.1/podman-5.3.1-setup.exe -OutFile podman-setup.exe
  3. Start-Process -Wait -PassThru ".\podman-setup.exe" -ArgumentList "/install /quiet WSLCheckbox=0 /log inst.log"
  4. podman machine init
  5. podman machine start
  6. docker ps
  7. exit ssh
  8. connect again
  9. docker ps
  10. the error is there

Describe the results you received

error

error during connect: Get "http://%2F%2F.%2Fpipe%2Fpodman-machine-default/v1.47/containers/json": open //./pipe/podman-machine-default: The system cannot find the file specified.

Describe the results you expected

I would expect it to work as it work in version 4.7.2 but not work since 4.8.0

podman info output

podman machine info:

host:
    arch: amd64
    currentmachine: ""
    defaultmachine: ""
    eventsdir: C:\Users\hudson\.local\share\containers\podman\podman
    machineconfigdir: C:\Users\hudson\.config\containers\podman\machine\wsl
    machineimagedir: C:\Users\hudson\.local\share\containers\podman\machine\wsl
    machinestate: ""
    numberofmachines: 0
    os: windows
    vmtype: wsl
version:
    apiversion: 5.2.5
    version: 5.2.5
    goversion: go1.23.2
    gitcommit: 10c5aa720d59480bc7edad347c1f5d5b75d4424f
    builttime: Wed Oct 23 17:54:08 2024
    built: 1729706048
    osarch: windows/amd64
    os: windows

podman info

:
  arch: amd64
  buildahVersion: 1.38.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.12-2.fc40.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 99.93
    systemPercent: 0.05
    userPercent: 0.02
  cpus: 48
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: container
    version: "40"
  eventLogger: journald
  freeLocks: 2048
  hostname: EC2AMAZ-DP5JU89
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.15.133.1-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 100041895936
  memTotal: 101054816256
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.0-1.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.0
  ociRuntime:
    name: crun
    package: crun-1.18.2-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.18.2
      commit: 00ab38af875ddd0d1a8226addda52e1de18339b5
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20241127.gc0fbc7e-1.fc40.x86_64
    version: |
      pasta 0^20241127.gc0fbc7e-1.fc40.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: unix:///run/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT 
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 25769803776
  swapTotal: 25769803776
  uptime: 0h 5m 28.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 876146688
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.3.1
  Built: 1732147200
  BuiltTime: Thu Nov 21 00:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.7
  Os: linux
  OsArch: linux/amd64
  Version: 5.3.1

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

No response

@jedla97 jedla97 added the kind/bug Categorizes issue or PR as related to a bug. label Dec 16, 2024
@github-actions github-actions bot added the remote Problem is in podman-remote label Dec 16, 2024
@baude
Copy link
Member

baude commented Dec 16, 2024

to be clear, you are trying to use the docker binary on windows backending to the podman service running in a podman machine?

@jedla97
Copy link
Author

jedla97 commented Dec 17, 2024

Sorry for late response.

to be clear, you are trying to use the docker binary on windows backending to the podman service running in a podman machine?

If I understand correctly I thinks we use docker binary, mainly because of docker compose. We mainly using it for testing so we want to have most of the setting same for podman and docker testing.

For more contex:

We instaling docker-compose using chocolatey. The docker-compose have dependency docker-cli which I assume instal docker binary (docker.exe).

After this we install podman using podman.exe (downloaded from https://github.com/containers/podman/releases). The command is

Invoke-WebRequest https://github.com/containers/podman/releases/download/v5.3.1/podman-5.3.1-setup.exe -OutFile podman.exe
Start-Process -Wait -PassThru ".\podman.exe" -ArgumentList "/install /quiet WSLCheckbox=0 /log inst.log"

After that we just run podman machine init and podman machine start

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. remote Problem is in podman-remote
Projects
None yet
Development

No branches or pull requests

2 participants