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

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

Closed
true-eye opened this issue Aug 12, 2020 · 21 comments
Closed

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

true-eye opened this issue Aug 12, 2020 · 21 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

@true-eye
Copy link

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)

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 12, 2020
@afbjorklund
Copy link
Contributor

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

@afbjorklund
Copy link
Contributor

afbjorklund commented Aug 12, 2020

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

@baude
Copy link
Member

baude commented Aug 12, 2020

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.

@mheon
Copy link
Member

mheon commented Sep 8, 2020

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.

@mheon mheon closed this as completed Sep 8, 2020
@peters95
Copy link

peters95 commented Nov 22, 2020

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.

@afbjorklund
Copy link
Contributor

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

@mheon
Copy link
Member

mheon commented Nov 22, 2020 via email

@peters95
Copy link

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.

@afbjorklund
Copy link
Contributor

@peters95 : You can also continue to describe the requirement here: #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://

@deftdawg
Copy link

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.

@afbjorklund
Copy link
Contributor

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 ?

@joewatza
Copy link

joewatza commented Mar 19, 2021

I have to with agree with others that podman needing another VM to handle the socket interface is an adoption barrier. Currently macos is my preferred dev env. I am using crc for openshift work as i want to interact with a local registry. This leaves me with giving up on podman and going to docker installed with the socket vm running as I DONT want to run another linux VM just so i can run podman commands to be able to jump to crc on my mac. Also as we are working with GKE and the gcloud client tools require something like docker as well to talk to registries....sorry just reality in 2021....I have resisted docker desktop for along time but i need to get my work done and i loved vagrant and vbox but support has moved to away from that as well...

@baude
Copy link
Member

baude commented Mar 19, 2021

hang tight ... stuff on the very near horizon!

@afbjorklund
Copy link
Contributor

This is now followed up in #8452 (the "friendly" error message was added in podman3)

Initially it got caught up in the semantics of needing to run a virtual machine (currently a requirement on macOS), and knowing that the system is running a virtual machine "behind the scenes". Most people just want someone else to handle it for them, like "serverless". It might still run on a server somewhere, as long they can interact with the system without knowing or caring ? So this new Podman-for-Mac product could run Linux in a VM (just like Docker), as long as it offers a podman.sock to the user...

On an unrelated note, CRC was going to offer Podman Remote support directly (some time)

@jonsmithers
Copy link

jonsmithers commented Apr 30, 2021

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

@frodopwns
Copy link

If you are on Mac and don't really need Podman you can use docker.

opm index add \
    --bundles controller-bundle:0.0.1 \
    --tag controller-index:0.0.1 \
    --container-tool docker

@gth7754125
Copy link

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

Just can not find podman.sock file, type podman info to check sock file's location.

@bentito
Copy link

bentito commented Jul 13, 2021

Sorry reading this thread through I still don't understand what to do to fix this? Getting the error same as @gth7754125 on May 26 and then can't use podman 3.2.2 for same reason. podman info fails with same error.

@ahaid
Copy link

ahaid commented Jul 14, 2021

I'm in the same boat as @bentito . I don't see how to solve this.

@rhatdan
Copy link
Member

rhatdan commented Jul 14, 2021

Please open a new issue describing your exact problem.

@bentito
Copy link

bentito commented Jul 15, 2021

done: #10944

@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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