[Bug]: 4.4.0 on Windows WSL now requires explicit -c <vmname> to perform podman ps etc
Issue Description
Hi,
After upgrading to 4.4.0 on Windows with WSL from 4.3.1 Podman now seems to require an explicit -c
If you don't explicitly specify -c option with the vmname then podman fails when doing a ps etc with
Error: failed to connect: dial tcp [::1]:63239: connectex: No connection could be made because the target machine actively refused it.
This happens with a fresh install (removing all old podman vms and files from the .local and .config folders) and simply initialising a new vm with podman machine init.
The Vm runs starts and stops fine and podman ps works if you ssh into the vm.
The only issue seems to be the explicit need for -c on the Windows CLI.
Interestingly i note the podman version is not 4.4.0 in the linux vm (rather it is still 4.3.1) unlike on the host where it is 4.4.0. I'm not sure if this is intentional or not.
I installed using the MSI (thanks for bringing back an MSI option though!)
Doug
Steps to reproduce the issue
Steps to reproduce the issue 1. 2. 3.
Describe the results you received
Describe the results you received
Describe the results you expected
Describe the results you expected
podman info output
Error: failed to connect: dial tcp [::1]:63239: connectex: No connection could be made because the target machine actively refused it.
If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.
podman machine info Host: Arch: amd64 CurrentMachine: podman-machine-default DefaultMachine: "" EventsDir: C:\Users\douglaswa.local\share\containers\podman\podman MachineConfigDir: C:\Users\douglaswa.config\containers\podman\machine\wsl MachineImageDir: C:\Users\douglaswa.local\share\containers\podman\machine\wsl MachineState: Running NumberOfMachines: 1 OS: windows VMType: wsl Version: APIVersion: 4.4.0 Built: 1675292552 BuiltTime: Thu Feb 2 00:02:32 2023 GitCommit: 3443f453e28169a88848f90a7ce3137fc4a4bebf GoVersion: go1.19.5 Os: windows OsArch: windows/amd64 Version: 4.4.0
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
Can you provide the output of podman system connection list, it should show you the list of configured connection and which one is set as default.
Hmm now I can't explain this but the problem appears to have resolved itself. I don't think i'm going mad as it was definitely happening. It was only today that i worked around it with the -c option when i was trouble shooting. I just re-installed now to see if i could recreate the issue but it seems all is well.
The only think i can think is it was some combination of creating vms, removing them and starting and stopping that resolved it...very strange.
Anyway for what its worth the output of the cmd (after re-install) is
podman-machine-default ssh://user@localhost:58309/run/user/1000/podman/podman.sock C:\Users\douglaswa.ssh\podman-machine-default true podman-machine-default-root ssh://root@localhost:58309/run/podman/podman.sock C:\Users\douglaswa.ssh\podman-machine-default false
Any idea why it couldn't connect or was even looking at port 63239. When i looked at the file "C:\Users\douglaswa.config\containers\podman\machine\wsl\podman-machine-default.json" the port 63239 was not the port mentioned in the file.
Perhaps this was the result of an upgrade from 4.3.1 to 4.4.0...although as i mentioned i cleaned up the files in .local and .config after i first saw the issue and the problem persisted after vms init/ start / stop / rm and repeat.
Confused!
Connections are stored in contianers.conf, AFAIK on windows you find contianers.conf in APPDATA\contianers\
thanks for your help! Will keep that in mind.