podman: Error: Get ../podman.sock: connect: no such file or directory

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

/kind bug

Description I installed podman on my macOS (High Sierra 10.13.6) using homebrew.

brew cask install podman

And it says that the podman was successfully installed!

Updating Homebrew...
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 471166 (delta 0), reused 2 (delta 0), pack-reused 471162
Receiving objects: 100% (471166/471166), 213.07 MiB | 718.00 KiB/s, done.
Resolving deltas: 100% (334004/334004), done.
Tapped 1 command and 3638 casks (3,753 files, 228.3MB).
==> Downloading https://github.com/containers/podman/releases/download/v2.0.3/podman-remote-release-darwin.zip
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/109145553/f709f680-cdc8-11ea-8c73-c6b5a9206b69?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'podman'.
==> Installing Cask podman
==> Linking Binary 'podman' to '/usr/local/bin/podman'.
šŸŗ  podman was successfully installed!

But after I enter podman on the terminal, it gives me the following error

Error: Get http://d/v1.0.0/libpod../../../_ping: dial unix ///var/folders/m5/s6r4jc2n683grgxld0r1hgch0000gn/T/run--1/podman/podman.sock: connect: no such file or directory

Steps to reproduce the issue:

  1. brew cask install podman

  2. podman

Describe the results you received: Error: Get http://d/v1.0.0/libpod../../../_ping: dial unix ///var/folders/m5/s6r4jc2n683grgxld0r1hgch0000gn/T/run–1/podman/podman.sock: connect: no such file or directory

Describe the results you expected:

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

Output of podman version: When I type ā€˜podman version’, it also shows the same error.

Error: Get http://d/v1.0.0/libpod../../../_ping: dial unix ///var/folders/m5/s6r4jc2n683grgxld0r1hgch0000gn/T/run--1/podman/podman.sock: connect: no such file or directory

Output of podman info --debug: Same here

Error: Get http://d/v1.0.0/libpod../../../_ping: dial unix ///var/folders/m5/s6r4jc2n683grgxld0r1hgch0000gn/T/run--1/podman/podman.sock: connect: no such file or directory

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


Additional environment details (AWS, VirtualBox, physical, etc.): I’m installing the podman on my Mac OS (High Sierra 10.13.6)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 21 (11 by maintainers)

Most upvoted comments

This seems like a limiting factor in terms of the adoption of podman. I wanted to use podman on mac to avoid the docker socket but if I’m required to have a linux VM this is even worse than the docker socket issue for a simple client setup.

I’m currently writing a blog on this but here is the short version.l You will need a linux server somewhere running sshd. Using an ssh key right now is required, but there is a PR upstream to fix this.

On the server:

  1. make sure sshd is running
  2. (assumming rootless) systemctl --user start podman

On the client.

  1. podman system connection add foobar --identity <path/to/key> ssh://user@host/run/user/<numerical_id>/podman/podman.sock
  2. podman system connection default foobar
  3. podman info <-- should now work

This is from memory and in a rush. hopefully it helps until i can publish this thing.

hang tight … stuff on the very near horizon!

The error from ā€œpodman-remoteā€ is similar on all platforms. But on mac/win, the binary is renamed to just ā€œpodmanā€.

Only excuse is that the output matches the one from the docker client. Maybe with a slightly less ā€œfriendlyā€ wording ?

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Error: Get "http://d/v2.0.0/libpod../../../_ping": dial unix ///run/podman/podman.sock: connect: no such file or directory

It also looks slightly different when running rootless, when compared to these ā€œregularā€ (rootful?) socket locations. i.e. then it would look like /run/user/1000/docker.sock and /run/user/1000/podman/podman.sock instead.


A friendly greeting could probably be added, but there still needs to be some documentation* on how to set up a VM… Cannot connect to the Podman socket at unix:///run/podman/podman.sock. Is the podman service running?

* the one you linked to doesn’t work with podman v2, only varlink

The podman.io documentation just assumes you know how to do it:

Podman is a tool for running Linux containers. You can do this from a MacOS/Windows desktop as long as you have access to a linux box either running inside of a VM on the host, or available via the network

https://www.redhat.com/sysadmin/podman-clients-macos-windows

The remote client uses a client-server model. You need Podman installed on a Linux machine or VM that also has the SSH daemon running. […] Before performing any Podman client commands, you must enable the podman.sock systemd service on the Linux server.

The ā€œnew approachā€ for this I was working with, uses Vagrant do it:

https://www.vagrantup.com/intro

Vagrant.configure("2") do |config|
  config.vm.box = "generic/fedora32"

  config.vm.provision "shell", privileged: false, inline: <<-SHELL
    sudo yum install -y podman

    systemctl enable --user podman.socket
    systemctl start --user podman.socket
  SHELL
end

vagrant up vagrant ssh-config

I was going to ā€œwrapā€ it in a more user-friendly script (replacing the deprecated docker-machine and podman-machine), but that work isn’t completely finished yet. There is also this issue with VirtualBox not working on the new Mac CPU (M1)

https://boot2podman.github.io/2020/07/22/machine-replacement.html


The other ticket was about a Mac bundle, using Hypervisor.framework

https://developer.apple.com/documentation/hypervisor

Then you wouldn’t need Vagrant and Virtualbox, or set up the VM.

It would be more like a ā€œPodman Desktopā€, where it was integrated ?

FWIW, as a brand new user, I didn’t understand why podman3 wasn’t working on MacOS until I found this issue.

I’ll just paste the new ā€œfriendlyā€ error message here for searchability.

Error: cannot connect to the Podman socket, please verify that Podman REST API service is running: Get "http://d/v3.1.2/libpod/_ping": dial unix ///var/folders/k_/ymblr1311ql89371ffblcqrr0000gq/T/podman-run--1/podman/podman.sock: connect: no such file or directory

Reading this issue I get that podman is Linux only. All that being said, assuming /usr/local/bin/podman knows it compiled for Mac or Windows shouldn’t it be possible to display a slightly more helpful error message?

dd@Mac-mini ~> podman pull openjdk
Error: Get "http://d/v2.0.0/libpod../../../_ping": dial unix ///var/folders/0j/b44fcwz92j1b7n05c95b94th0000gn/T/run--1/podman/podman.sock: connect: no such file or directory

Oop! Looks like you're trying to run podman on OSX, you'll need to configure a Linux podman host and edit 
the configuration file in /Library/podman/config ...  blah blah blah here's the link 
(https://developers.redhat.com/blog/2020/02/12/podman-for-macos-sort-of/) to a doc you can go read in 
order to get podman running.

To elaborate further, it’s simply not technically possible to do containers natively on OS X at the moment. The kernel features that containers rely on (most notably process namespacing) are simply not available on OS X, and Apple has shown no interest in adding them thus far. The model at this point for both us and Docker is a native OS X binary capable of remotely connecting to a server that actually launches containers (typically located on a VM, but can also be on a remote server as well). Docker does package things up quite neatly, but I assure you they are also doing Linux VMs for local development on OS X.

On Sun, Nov 22, 2020 at 3:32 PM Anders Bjƶrklund notifications@github.com wrote:

This seems like a limiting factor in terms of the adoption of podman. I wanted to use podman on mac to avoid the docker socket but if I’m required to have a linux VM this is even worse than the docker socket issue for a simple client setup.

Podman is a Linux-only program. Hopefully this is now clear, from the new podman.io documentation ? With ā€œPodman Machineā€ I tried to bring the support to 2015 standards, but it failed - and is deprecated.

If you want to discuss the availability of a Mac bundle, I would suggest the podman community meeting https://podman.io/community/meeting/. On Windows you can use WSL, but there is no such built-in feature (i.e. a Linux distribution) in macOS…

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/containers/podman/issues/7301#issuecomment-731842703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3AOCFSYJRCE6AMNAZR2UDSRFYMZANCNFSM4P32OO2Q .