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

podman machine - Cannot connect to Podman on MacOS #12728

Closed
iamgini opened this issue Jan 2, 2022 · 10 comments
Closed

podman machine - Cannot connect to Podman on MacOS #12728

iamgini opened this issue Jan 2, 2022 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@iamgini
Copy link

iamgini commented Jan 2, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

On MacOS Monterey (12.1) podman is unable to connect to the podman machine

Steps to reproduce the issue:

  1. podman machine init

  2. podman machine start

  3. podman version or any podman subcommand (e: podman ps)

Describe the results you received:

$ 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

Describe the results you expected:

Expecting to get the podman version information and other information.

Additional information you deem important (e.g. issue happens only occasionally):

Not working at all. (It worked earlier but not sure the new macOS version causing the issue)

Output of podman version:

(paste your output here)

Output of podman info --debug:

$ 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 --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

Package info (e.g. output of rpm -q podman or apt list podman):

$ 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)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

MacOS:

$ sw_vers 
ProductName:    macOS
ProductVersion: 12.1
BuildVersion:   21C52
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 2, 2022
@baude
Copy link
Member

baude commented Jan 3, 2022

the /tmp directory it cannot find is odd. On MacOS we should not be using that iirc.

@kishorekkota
Copy link

kishorekkota commented Jan 3, 2022

I have the same issue as well and I have the same exact podman version. It was working fine with the previous version.

@iamgini
Copy link
Author

iamgini commented Jan 4, 2022

the /tmp directory it cannot find is odd. On MacOS we should not be using that iirc.

Any workaround for this ?
As I mentioned it was working earlier. !

@Luap99
Copy link
Member

Luap99 commented Jan 4, 2022

It looks podman is trying to connect to the $SSH_AUTH_SOCK address but this is failing.
Can you run unset SSH_AUTH_SOCK and try again.

@iamgini
Copy link
Author

iamgini commented Jan 4, 2022

@Luap99 that was an amazing tip. Yes, it worked !!!

Thank you so much.

The issue has been resolved :)

@iamgini iamgini closed this as completed Jan 4, 2022
@fulldecent
Copy link
Contributor

I get this issue using VS Code + Remote Containers extension. VS Code does not seem to have a way to include this unset SSH_AUTH_SOCK directive.

@baude
Copy link
Member

baude commented Mar 21, 2022

@jwhonce ^^^ heads up

@rishabhsri18
Copy link

I got the same issue

$ 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 socket: server API version is too old. Client "4.0.0" server "3.4.4"

I tried recreating the machine and it worked
# Recreate machine (DESTRUCTIVE!) 
	podman machine stop
	podman machine rm -f
	podman machine init --now

$ podman version           
Client:       Podman Engine
Version:      4.0.3
API Version:  4.0.3
Go Version:   go1.18
Built:        Fri Apr  1 20:58:59 2022
OS/Arch:      darwin/amd64

Server:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18
Built:        Fri May  6 21:45:54 2022
OS/Arch:      linux/amd64

@mheon
Copy link
Member

mheon commented Jun 21, 2022

Please file a new issue, as this one has already been closed as fixed.

@khall1026
Copy link

Thanks, @rishabhsri18. recreating the machine worked for me as well.

I got the same issue

$ 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 socket: server API version is too old. Client "4.0.0" server "3.4.4"

I tried recreating the machine and it worked
# Recreate machine (DESTRUCTIVE!) 
	podman machine stop
	podman machine rm -f
	podman machine init --now

$ podman version           
Client:       Podman Engine
Version:      4.0.3
API Version:  4.0.3
Go Version:   go1.18
Built:        Fri Apr  1 20:58:59 2022
OS/Arch:      darwin/amd64

Server:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18
Built:        Fri May  6 21:45:54 2022
OS/Arch:      linux/amd64

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

8 participants