0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows11でPodmanを使用していて急にエラーが出た時の対応方法

0
Last updated at Posted at 2026-02-20

トラブルの内容

Podman Desktopをインストールし、PowerShellからpodmanを使用しいろいろ試していました。
インストールの手順はこちらの「Podmanの環境をWindows11に作ろうとして初心者がはまった点」に書いた通りです。

突然、 podman compose version を実行するときにエラーが出るようになりました。

PS C:\Users\satok\test\webapi> podman compose version
Error: get machine connection URI: could not find a matching machine for connection "ssh://user@127.0.0.1:64871/run/user/1000/podman/podman.sock"

しかしコンテナは実行されていて、podman container listの出力は正常でした。

また、podman machine listでもこのようなエラーが出ました。

PS C:\Users\satok\test> podman machine list
Error: command C:\Windows\system32\wsl.exe [-u root -d podman-machine-default sh] failed: exit status 0xffffffff ()

解決方法

wslをシャットダウンしpodman machineを起動しなおしたら直りました。

PS C:\Users\satok\test> wsl --shutdown
PS C:\Users\satok\test> podman machine list
NAME                     VM TYPE     CREATED      LAST UP     CPUS        MEMORY      DISK SIZE
podman-machine-default*  wsl         3 weeks ago  Never       8           2
PS C:\Users\satok\test> podman machine start
Starting machine "podman-machine-default"

This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:

        podman machine set --rootful

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.
time="2026-02-20T10:23:31+09:00" level=error msg="Process exited with status 2"
Machine "podman-machine-default" started successfully
PS C:\Users\satok\test> podman machine list   
NAME                     VM TYPE     CREATED      LAST UP            CPUS        MEMORY      DISK SIZE
podman-machine-default*  wsl         3 weeks ago  Currently running  8           2GiB        100GiB
PS C:\Users\satok\test> podman compose version
>>>> Executing external compose provider "C:\\Users\\satok\\AppData\\Local\\Microsoft\\WindowsApps\\docker-compose.exe". Please see podman-compose(1) for how to disable this message. <<<<

Docker Compose version v5.0.2

考察

Podmanはコンテナを実行するために、podman machineという独自のLinux仮想マシンを必要とします。podman machineをrootlessで作成したので、ssh://user@127.0.0.1:64871/run/user/1000/podman/podman.sockと記載があるように、Windowsからはsshでpodman-machine-defaultに接続しに行っています。

PS C:\Users\satok\docker> podman system connection list
Name                         URI                                                          Identity                                                       Default     ReadWrite
podman-machine-default       ssh://user@127.0.0.1:64871/run/user/1000/podman/podman.sock  C:\Users\satok\.local\share\containers\podman\machine\machine  true        true
podman-machine-default-root  ssh://root@127.0.0.1:64871/run/podman/podman.sock            C:\Users\satok\.local\share\containers\podman\machine\machine  false       true

1つめのpodman compose versionで出たエラーは、この接続先が見つからないというメッセージでした。理由はわかりませんがそのような状態になり、wsl --shutdownを実行することで接続先もいったん全部作り直され、正常に戻ったと推察されます。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?