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

Missing known_hosts file in Windows prevents connection as of 5.3.0 #24616

Open
scottrudy opened this issue Nov 20, 2024 · 2 comments · May be fixed by containers/common#2256
Open

Missing known_hosts file in Windows prevents connection as of 5.3.0 #24616

scottrudy opened this issue Nov 20, 2024 · 2 comments · May be fixed by containers/common#2256
Assignees
Labels
5.3 kind/bug Categorizes issue or PR as related to a bug. regression remote Problem is in podman-remote windows issue/bug on Windows

Comments

@scottrudy
Copy link

Issue Description

Podman 5.3.0 on Windows throws exception on missing path when run.

Steps to reproduce the issue

Steps to reproduce the issue

  1. In my case I had 5.2.5 installed via winget (pretty vanilla install) and upgraded using winget upgrade --all
  2. the podman machine would start, but when trying issue a podman ps -a and other commands I would get a connectivity error
  3. logging into the machine allowed podman ps -a to work fine
  4. I uninstalled the machine and podman and then reinstalled 5.3.0 directly, but faced the same issue

Describe the results you received

Cannot connect to Podman. Please verify your connection to the Linux system using podman system connection list, or try podman machine init and podman machine start to manage a new Linux VM
Error: unable to connect to Podman socket: open C:\Users{username}.ssh\known_hosts: The system cannot find the path specified.

Describe the results you expected

I expected to see the containers on the machine

podman info output

PS C:\Users\scott> podman version
Client:       Podman Engine
Version:      5.3.0
API Version:  5.3.0
Go Version:   go1.23.3
Git Commit:   874bf2c301ecf0ba645f1bb45f81966cc755b7da
Built:        Wed Nov 13 08:19:59 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      5.3.0
API Version:  5.3.0
Go Version:   go1.22.7
Built:        Tue Nov 12 19:00:00 2024
OS/Arch:      linux/amd64
PS C:\Users\scott> podman info
host:
  arch: amd64
  buildahVersion: 1.38.0
  cgroupControllers: []
  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.1
    systemPercent: 0.35
    userPercent: 0.55
  cpus: 12
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: container
    version: "40"
  eventLogger: journald
  freeLocks: 2041
  hostname: SPRUDY-SP9
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 5.15.167.4-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 6386536448
  memTotal: 8238841856
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.12.2-2.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.12.2
    package: netavark-1.12.2-1.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.12.2
  ociRuntime:
    name: crun
    package: crun-1.17-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.17
      commit: 000fa0d4eeed8938301f3bcf8206405315bc1017
      rundir: /run/user/1000/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^20241030.gee7d0b6-1.fc40.x86_64
    version: |
      pasta 0^20241030.gee7d0b6-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/user/1000/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: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 2147483648
  swapTotal: 2147483648
  uptime: 0h 10m 55.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 5
    paused: 0
    running: 4
    stopped: 1
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user/.local/share/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 1758658560
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 4
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/user/.local/share/containers/storage/volumes
version:
  APIVersion: 5.3.0
  Built: 1731456000
  BuiltTime: Tue Nov 12 19:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.7
  Os: linux
  OsArch: linux/amd64
  Version: 5.3.0

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

PS C:\Users\scott> cmd /c ver

Microsoft Windows [Version 10.0.22631.4460]
PS C:\Users\scott> wsl -l -v
NAME STATE VERSION

  • Ubuntu Stopped 2
    podman-machine-default Running 2
    PS C:\Users\scott> wsl --version
    WSL version: 2.3.26.0
    Kernel version: 5.15.167.4-1
    WSLg version: 1.0.65
    MSRDC version: 1.2.5620
    Direct3D version: 1.611.1-81528511
    DXCore version: 10.0.26100.1-240331-1435.ge-release
    Windows version: 10.0.22631.4460

Additional information

I was able to eventually workaround the issue by adding an empty C:\Users\{username}\.ssh\known_hosts file, but given that the file is 0 bytes, it doesn't seem like it's something the podman command should fail on or at least possibly the installer could touch the file to ensure it exists.

@scottrudy scottrudy added the kind/bug Categorizes issue or PR as related to a bug. label Nov 20, 2024
@github-actions github-actions bot added remote Problem is in podman-remote windows issue/bug on Windows labels Nov 20, 2024
@baude
Copy link
Member

baude commented Nov 22, 2024

per #24650 , I believe this is only the lack of the ~/.ssh directory itself. I added that directory with mkdir and the known_hosts was created as expected. I will close #24650 as a dup.

@scottrudy
Copy link
Author

per #24650 , I believe this is only the lack of the ~/.ssh directory itself. I added that directory with mkdir and the known_hosts was created as expected. I will close #24650 as a dup.

Confirmed.

@Luap99 Luap99 self-assigned this Nov 26, 2024
Luap99 added a commit to Luap99/common that referenced this issue Nov 26, 2024
Using the path package is not correct on windows as it always defaults
to the "/" as path separator. Instead one must use the filepath package.

Fixes containers/podman#24616

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99 Luap99 linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.3 kind/bug Categorizes issue or PR as related to a bug. regression remote Problem is in podman-remote windows issue/bug on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants