skip to Main Content

Update: This is solved, please see the answer.

I am using podman on MacOS with podman machine and now podman is unable to connect to the podman machine.

(It worked earlier but not sure the new macOS version causing the issue)

MacOS Monterey (12.1)

$ podman machine init
Extracting compressed file

$ podman machine start
INFO[0000] waiting for clients...                       
INFO[0000] listening tcp://127.0.0.1:7777               
INFO[0000] new connection from  to /var/folders/8f/v0tpqxg56wsf9x6x6tntjt5h0000gn/T/podman/qemu_podman-machine-default.sock 
Waiting for VM ...
Machine "podman-machine-default" started successfully

$ podman machine ls
NAME                     VM TYPE     CREATED             LAST UP            CPUS        MEMORY      DISK SIZE
podman-machine-default*  qemu        About a minute ago  Currently running  1           2.147GB     10.74GB

$ podman version
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. failed to create sshClient: dial unix /private/tmp/com.apple.launchd.WAh1QMSoLg/Listeners: connect: no such file or directory

$ podman ps
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. failed to create sshClient: dial unix /private/tmp/com.apple.launchd.WAh1QMSoLg/Listeners: connect: no such file or directory

$ podman run -dt -p 8080:80 nginx
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. failed to create sshClient: dial unix /private/tmp/com.apple.launchd.WAh1QMSoLg/Listeners: connect: no such file or directory

$ podman --log-level=debug version
INFO[0000] podman filtering at log level debug          
DEBU[0000] Called version.PersistentPreRunE(podman --log-level=debug version) 
DEBU[0000] SSH Ident Key "/Users/gini/.ssh/podman-machine-default" SHA256:duxS/j3bzl90jSUtbXVIofL4O+FqZ5sUL63c26u2gdo ssh-ed25519 
DEBU[0000] Found SSH_AUTH_SOCK "/private/tmp/com.apple.launchd.WAh1QMSoLg/Listeners", ssh-agent signer(s) enabled 
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. failed to create sshClient: dial unix /private/tmp/com.apple.launchd.WAh1QMSoLg/Listeners: connect: no such file or directory

Describe the results you expected:

Expecting to get the podman version and other information.

Package info:

$ brew info podman
podman: stable 3.4.4 (bottled), HEAD
Tool for managing OCI containers and pods
https://podman.io/
/usr/local/Cellar/podman/3.4.4 (170 files, 40MB) *
  Poured from bottle on 2021-12-29 at 21:51:28
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/podman.rb
License: Apache-2.0
==> Dependencies
Build: go ✘, go-md2man ✘
Required: qemu ✔
==> Options
--HEAD
        Install HEAD version
==> Caveats
zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Analytics
install: 11,107 (30 days), 38,817 (90 days), 78,249 (365 days)
install-on-request: 11,111 (30 days), 38,825 (90 days), 78,240 (365 days)
build-error: 2 (30 days)
$ sw_vers 
ProductName:    macOS
ProductVersion: 12.1
BuildVersion:   21C52

2

Answers


  1. Chosen as BEST ANSWER

    Thanks to Luap99.

    podman was trying to connect to the $SSH_AUTH_SOCK address but this is failing.

    executed below command and the problem solved.

    unset SSH_AUTH_SOCK
    

  2. I have this problem
    I solve with this

    After this all run correct

    mkdir -p /Applications/Docker.app/Contents/Resources/cli-plugin
    
    podman machine stop
    podman machine rm -f
    podman machine init --now
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search