containers / podman-desktop

Podman Desktop - A graphical tool for developing on containers and Kubernetes
https://podman-desktop.io
Apache License 2.0
4.22k stars 264 forks source link

Podman Machine sometime is not able to pull image via Podman Desktop on Windows with WSL with Error: no running provider for the matching container #6982

Open odockal opened 3 weeks ago

odockal commented 3 weeks ago

Bug description

I have a rootful machine or rootless one, individually both works fine. When I got into scenario, where I have one machine stopped with connection being used by this machine and creates new machine and starts it, I am asked by podman desktop if I want to switch the defautl connection, which I accepts and all seems fine. Although when I try to pull an image I got: Error: no running provider for the matching container in the UI.

Although If I try to pull an image from cli, everything works fine. It is same issue as #6455, but this time the reproducer differs.

Operating system

Windows 10

Installation Method

Installer from website/GitHub releases

Version

1.10.0

Steps to reproduce

  1. Create and start a machine using podman 5.0.2.
  2. Stop the machine
  3. Create new machine different than the other
  4. Start new machine
  5. Accept switching of the default connection
  6. Assert: Machine started, podman system connection ls show right connection being set to default
  7. Pull an image using podman desktop
  8. Assert: Can pull image Actual result: image is not pulled, Error appers.

podman pull alpine works fine.

Relevant log output

No response

Additional context

Referenced issue #6455. Very likely the problem is the same, although symptoms differ.

Workaround

Restarting the machine sometimes helps

odockal commented 2 weeks ago

I have encountered this issue while testing #7024. I believe that changes in PR are not to blame. here is the error log from the PD:

error : main ↪️ Kubeconfig path C:\Users\podmanqe\.kube\config provided does not exist. Skipping.
log : main ↪️ Starting http server to handle webviews on port 44000
error : main ↪️ Error: Error: ENOENT: no such file or directory, open 'C:\Users\podmanqe\git\podman-desktop\dist\win-unpacked\resources\app-update.yml'
error : main ↪️ unable to check for updates Error: ENOENT: no such file or directory, open 'C:\Users\podmanqe\git\podman-desktop\dist\win-unpacked\resources\app-update.yml'
log : main ↪️ unable to check for updates Error: ENOENT: no such file or directory, open 'C:\Users\podmanqe\git\podman-desktop\dist\win-unpacked\resources\app-update.yml'
log : main ↪️ System ready. Loading extensions...
log : main ↪️ Fetched https://registry.podman-desktop.io/api/extensions.json in 159.0793999999987ms
log : main ↪️ Activating extension (podman-desktop.compose) with max activation time of 10 seconds
log : main ↪️ Activating extension (podman-desktop.docker) with max activation time of 10 seconds
log : main ↪️ Activating extension (podman-desktop.kind) with max activation time of 10 seconds
log : main ↪️ Activating extension (podman-desktop.kube-context) with max activation time of 10 seconds
log : main ↪️ [kube-context] starting extension kube-context
log : main ↪️ Activating extension (podman-desktop.kubectl-cli) with max activation time of 10 seconds
log : main ↪️ Activating extension (podman-desktop.lima) with max activation time of 10 seconds
debug : main ↪️ [lima] Could not find socket at C:\Users\podmanqe\.lima\podman\sock\podman.sock
log : main ↪️ Activating extension (podman-desktop.podman) with max activation time of 10 seconds
log : main ↪️ Activating extension (podman-desktop.registries) with max activation time of 10 seconds
log : main ↪️ Activating extension (podman-desktop.docker) ended in 479 milliseconds
log : main ↪️ Activating extension (podman-desktop.kube-context) ended in 243 milliseconds
log : main ↪️ Activating extension (podman-desktop.lima) ended in 122 milliseconds
log : main ↪️ Activating extension (podman-desktop.registries) ended in 22 milliseconds
debug : main ↪️ [podman] Error while pinging docker as podman Error: connect ENOENT //./pipe/docker_engine
log : main ↪️ Activating extension (podman-desktop.compose) ended in 577 milliseconds
log : main ↪️ [kind] kind extension is active
log : main ↪️ Activating extension (podman-desktop.kind) ended in 409 milliseconds
log : main ↪️ Activating extension (podman-desktop.kubectl-cli) ended in 283 milliseconds
error : main ↪️ [compose] Error getting compose version: Error: Failed to execute command: spawn C:\Users\podmanqe\.local\share\containers\podman-desktop\extensions-storage\podman-desktop.compose\bin\docker-compose.exe ENOENT
warn : main ↪️ [podman] Unable to run regex on containers.conf file. Reason: Error: ENOENT: no such file or directory, open 'C:\Users\podmanqe\AppData\Roaming\containers\containers.conf'
log : main ↪️ Activating extension (podman-desktop.podman) ended in 261 milliseconds
log : main ↪️ PluginSystem: initialization done.
log : main ↪️ Autostarting podman-desktop.podman container engine
log : main ↪️ [kind] kind extension is active
warn : MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 extensions-started listeners added. Use emitter.setMaxListeners() to increase limit
warn : MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 extension-started listeners added. Use emitter.setMaxListeners() to increase limit
warn : MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 extension-stopped listeners added. Use emitter.setMaxListeners() to increase limit
log : main ↪️ PluginSystem: received dom-ready event from the UI
log : main ↪️ Delayed startup, flushing 58 events
log : main ↪️ [kind] kind extension is active
log : main ↪️ [kind] kind extension is active
log : main ↪️ [kind] kind extension is active
log : main ↪️ [kind] kind extension is active
log : main ↪️ [podman] WSL has been installed without the default distribution
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no engine matching this container
error : main ↪️ /event stream received an error. Error: aborted
warn : main ↪️ Error when handling events Error: Error in handling events Will reconnect in 5s Error: Error in handling events
log : main ↪️ error is Error: connect ENOENT \\.\pipe\podman-machine-default
warn : main ↪️ Error when handling events Error: Error in handling events Will reconnect in 5s Error: Error in handling events
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
debug : main ↪️ [podman] Error while pinging docker as podman Error: connect ENOENT //./pipe/docker_engine
log : main ↪️ Aborting reconnect due to error as connection is now stopped
log : main ↪️ Aborting reconnect due to error as connection is now stopped
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
warn : main ↪️ [podman]  Can't get machine rootful resource usage error Error: no engine matching this container
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ event is [object Object]
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
error : main ↪️ /event stream received an error. Error: aborted
warn : main ↪️ Error when handling events Error: Error in handling events Will reconnect in 5s Error: Error in handling events
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ error is Error: connect ENOENT \\.\pipe\podman-rootful
warn : main ↪️ Error when handling events Error: Error in handling events Will reconnect in 5s Error: Error in handling events
debug : main ↪️ [podman] Error while pinging docker as podman Error: connect ENOENT //./pipe/docker_engine
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ Aborting reconnect due to error as connection is now stopped
log : main ↪️ Aborting reconnect due to error as connection is now stopped
log : main ↪️ Aborting reconnect due to error as connection is now stopped
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
log : main ↪️ Engine does not have an API or a libpod API, returning empty array Podman
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container
warn : main ↪️ [podman]  Can't get machine podman-machine-default resource usage error Error: no running provider for the matching container

Some machine information

podman machine ls
NAME                    VM TYPE     CREATED         LAST UP            CPUS        MEMORY      DISK SIZE
podman-machine-default  wsl         13 minutes ago  Currently running  2           2GiB        100GiB
rootful                 wsl         7 minutes ago   6 minutes ago      2           2GiB        100GiB
PS C:\Users\podmanqe> podman system connection ls
Name                         URI                                                          Identity                                                          Default     ReadWrite
podman-machine-default       ssh://user@127.0.0.1:65318/run/user/1000/podman/podman.sock  C:\Users\podmanqe\.local\share\containers\podman\machine\machine  false       true
podman-machine-default-root  ssh://root@127.0.0.1:65318/run/podman/podman.sock            C:\Users\podmanqe\.local\share\containers\podman\machine\machine  true        true
rootful                      ssh://user@127.0.0.1:65355/run/user/1000/podman/podman.sock  C:\Users\podmanqe\.local\share\containers\podman\machine\machine  false       true
rootful-root                 ssh://root@127.0.0.1:65355/run/podman/podman.sock            C:\Users\podmanqe\.local\share\containers\podman\machine\machine  false       true

Podman version:

podman version
Client:       Podman Engine
Version:      5.0.2
API Version:  5.0.2
Go Version:   go1.22.1
Git Commit:   3304dd95b8978a8346b96b7d43134990609b3b29
Built:        Wed Apr 17 21:17:45 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      5.1.0-dev-4817811cb
API Version:  5.1.0-dev-4817811cb
Go Version:   go1.21.9
Built:        Wed Apr 17 02:00
odockal commented 2 weeks ago

The code where the warning message originated: https://github.com/containers/podman-desktop/blob/aa0e0b0b2c61282a9731ed7263798591bd71f459/extensions/podman/src/extension.ts#L207-L214

axel7083 commented 2 weeks ago

I followed all the steps mentioned and I was not able to replicates, after the message stating that the new machine has been set as default successfully, then finally I am navigating and successfully pulling the image alpine without issue.

image

I will try to dig in the code to see if there are some place than can go wrong

benoitf commented 2 weeks ago

side question: is it expected on Windows to have podman being 5.1.0-dev and not like 5.0.2 ?

benoitf commented 2 weeks ago

removing 1.10.1 label as it's not reproducible by all folks

odockal commented 2 weeks ago

side question: is it expected on Windows to have podman being 5.1.0-dev and not like 5.0.2 ?

That is a good question. I asked on the channel.

odockal commented 2 weeks ago

removing 1.10.1 label as it's not reproducible by all folks

Fair enough. Although, I am seeing from time to time, hope to find some bullet proof reproducer.