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

Created on 12 Aug 2020  ·  11Comments  ·  Source: containers/podman

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)

kinbug

All 11 comments

After installing podman (-remote) on your Mac, you need to set up the environment to point to your Linux server (with podman)

Unfortunately there is no documentation for v2 yet, but something like:
export CONTAINER_HOST=ssh://root@linuxhost/run/podman/podman.sock

The documentation progress is here: #6830

I'm not really sure what Mac uses to administer* the built-in virtualization, but a VM with Fedora should be enough for podman...

* Previously we used VirtualBox, but that has been deprecated. Other commercial alternatives include VMware and Parallels.

https://fedoramagazine.org/install-fedora-virtualbox-guest/

sudo dnf -y install podman

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 ssh://user@host/run/user//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.

The blog has been published: https://www.redhat.com/sysadmin/podman-clients-macos-windows

I'm going to go ahead and close this - please open a new bug with any further issues that arise with the new process.

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.

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.
On Windows you can use WSL, but there is no such built-in feature (i.e. a Linux distribution) in macOS...

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
.

Just bringing this up so you are aware users are still running into this.

In general I think we should consider making the installation similar to Docker users just want it to work out of the box.

I understand docker uses a VM that is not the point the problem is when a new user does:

brew install podman

It does not work.

Thanks @afbjorklund I will look into joining the community meetings and see if I can bring some other key community members from the cloud-native space into this discussion.

@peters95 : You can also continue to describe the requirement here: https://github.com/containers/podman/issues/8452

This old issue was more about the default error when not having a server, which is similar on Linux too:

$ podman-remote version
Error: Get "http://d/v2.0.0/libpod../../../_ping": dial unix ///run/user/1000/podman/podman.sock: connect: no such file or directory

The new issue is more about what are you are describing, how to bundle a Linux VM with a Mac version.


Maybe have a Linux VM that exports a UNIX socket, the same way that /var/run/docker.sock works ?

https://web.archive.org/web/20171003123928if_/https://docs.docker.com/docker-for-mac/docker-toolbox/

When using podman-machine and other similar solutions, it would connect to the VM using ssh://

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.

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 ?

Was this page helpful?
4 / 5 - 1 ratings