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

[macOS] Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory #4364

Closed
amitkrout opened this issue Oct 29, 2019 · 44 comments
Assignees
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

@amitkrout
Copy link

amitkrout commented Oct 29, 2019

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

/kind bug

Description

Steps to reproduce the issue:

  1. $ brew cask install podman

  2. $ podman pull ubuntu

Describe the results you received:

$ podman pull ubuntu
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

Describe the results you expected:
should not throw runtime error

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

Output of podman version:

$ podman version
Client:
Version:            1.6.1-dev
RemoteAPI Version:  1
Go Version:         go1.12.9
OS/Arch:            darwin/amd64

Service:
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

Output of podman info --debug:

$ podman info --debug
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

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

(paste your output here)

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

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 29, 2019
@amitkrout
Copy link
Author

/remove feature

@baude baude removed the kind/feature Categorizes issue or PR as related to a new feature. label Oct 29, 2019
@rhatdan
Copy link
Member

rhatdan commented Oct 29, 2019

You need to configure a Linux system to be accessible by podman for podman on MAC to work.

@amitkrout
Copy link
Author

amitkrout commented Oct 29, 2019

@rhatdan It would be really helpful if you share some kind of doc reference of what you suggest

@rhatdan
Copy link
Member

rhatdan commented Oct 30, 2019

@jwhonce is preparing such a document now.

@ssbarnea
Copy link
Collaborator

Did you managed to get a signed podman, my testing of podman got stuck at #4511

@ag1989
Copy link

ag1989 commented Nov 14, 2019

Did you managed to get a signed podman, my testing of podman got stuck at #4511

Nope, still not properly signed...

@amitkrout
Copy link
Author

Did you managed to get a signed podman, my testing of podman got stuck at #4511

Nope, still not properly signed...

FYI... In case you are using macOS Catalina
https://developer.apple.com/news/?id=09032019a

@zekaguilar
Copy link

Hi, I've got stuck here too, any draft to share @jwhonce ?
Thanks !

@MrBuddyCasino
Copy link

Would be interested in how to get podman running on macOS, too. Any hints?

@guiguir68
Copy link

Same problem here. Waiting for you @jwhonce :)

podman version 1.6.1-dev (installed with brew cask)
macOS Catalina 10.15.1

@sachingorade
Copy link

@jwhonce is preparing such a document now.

Please post the link if its partially done too (to at least get podman working :) )

Thanks.

@misanche
Copy link

waiting the document too :)

@jwhonce
Copy link
Member

jwhonce commented Dec 10, 2019

I don't have access to Catalina, so these are my best guesses until I do:

# xattr -d com.apple.quarantine /usr/local/bin/podman
Or,
# xattr -d com.apple.quarantine readlink /usr/local/bin/podman
should get you over the signing issue. Then setting PODMAN_VARLINK_BRIDGE to point to your linux server.

$ export PODMAN_VARLINK_BRIDGE=$'ssh -T -p22 root@localhost -- "varlink -A \'podman varlink \$VARLINK_ADDRESS\' bridge"'

Note that in the above example the macos user has provided the linux server with their ssh public key for access without a password. And yes, varlink is called twice. Once, for the ssh-tunnel the other is doing the actual work. I hope this helps.

@zhuguoliang
Copy link

Got stuck here too

Client:
Version: 1.6.1-dev
RemoteAPI Version: 1
Go Version: go1.12.9
OS/Arch: darwin/amd64
Service:
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

@lokinell
Copy link

I have the same problem.

@ssbarnea
Copy link
Collaborator

I can give ssh access to a MacOS Catalina with latest xcode and homebrew if any libpod developer for debugging libpod building.

I suspect that building podman for macos will be a real struggle if we build inside a linux vm code that later runs on macos. I bet is not possible to sign that binaries from within the linux vm.

@davinkevin
Copy link

The same problem for me on a fresh macOS Catalina install with only Podman installed (with brew cask).

Very sad to not be able to replace the docker-cli with it now...

@andreufontb
Copy link

The macOS catalina filesystem is mounted in a readonly partition. It looks like podman is triyng to set run time in this partition.

$ sudo mkdir -p /run/podman
mkdir: /run/podman: Read-only file system

Installing version 1.6.3 i get a more

Client:
Version: 1.6.3-dev
RemoteAPI Version: 1
Go Version: go1.12.10
Git Commit: 6c6e783
Built: Tue Oct 29 20:08:11 2019
OS/Arch: darwin/amd64

Service:
Error: error creating libpod runtime: dial unix /run/podman/io.podman: connect: no such file or directory

@rhatdan
Copy link
Member

rhatdan commented Jan 4, 2020

Podman expects /run to be mounted as a tmpfs and be writeable.

@afbjorklund
Copy link
Contributor

It also expects it to contain a unix socket, which it probably wont.

Exposing the socket file from the VM to the Mac host is a big hassle...
Docker does this *, but I'm not sure that Podman has the same need.

Probably easier to just use the varlink protocol (over ssh) instead ?

Seems like the original root cause is the missing environment variables.
Without the remote config, it will assume it is running on a Linux host.

It needs the PODMAN_VARLINK_BRIDGE set up

For instance: podman-machine env --varlink

@afbjorklund
Copy link
Contributor

@jwhonce : did you complete any docs, on how to set up the Linux virtual machine ?

Here is one link that I found: https://medium.com/@bszeti/podman-and-skopeo-on-macos-1b3b9cf21e60

It uses VirtualBox, to create a Fedora VM and then install ssh and podman packages.

Similar to this setup: https://podman.io/blogs/2019/01/14/podman-machine-and-boot2podman.html

@ipbabble
Copy link
Collaborator

@amitkrout I followed the instructions here and got it to work:
https://github.com/containers/libpod/blob/master/docs/tutorials/remote_client.md

But FYI export that env var for the link. I'm not sure why the doc shows it the way it does.

@jwhonce
Copy link
Member

jwhonce commented Jan 27, 2020

@ipbabble #4997 updates the documentation for setting up the varlink bridge.

@vrothberg
Copy link
Member

@jwhonce, is this issue resolved with the latest updates to the docs?

@jwhonce jwhonce closed this as completed Jan 31, 2020
@vrothberg
Copy link
Member

@TomSweeneyRedHat WDYT?

@TomSweeneyRedHat
Copy link
Member

Sure, always happy to take a PR.

@Aisuko
Copy link

Aisuko commented Mar 28, 2020

I hit the same issue, Is there any update for this issue?

➜  ~ podman version
Client:
Version:            1.6.1-dev
RemoteAPI Version:  1
Go Version:         go1.12.9
OS/Arch:            darwin/amd64

Service:
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

@ahmetb
Copy link

ahmetb commented Mar 28, 2020

I won't be able to provide a PR, I am hoping maintainers can jump in.

TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Mar 28, 2020
We've had comments in containers/podman#4364 that it's unclear
that we don't actually run Podman on Windows and Mac, rather it runs only on Linux and
you need remote clients on the other platforms.

This updates the whatis document to hopefully clarify.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Mar 28, 2020
We've had comments in containers/podman#4364 that it's unclear
that we don't actually run Podman on Windows and Mac, rather it runs only on Linux and
you need remote clients on the other platforms.

This updates the whatis document to hopefully clarify.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
@TomSweeneyRedHat
Copy link
Member

Clarified (hopefully) in containers/podman.io#210

TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Mar 31, 2020
We've had comments in containers/podman#4364 that it's unclear
that we don't actually run Podman on Windows and Mac, rather it runs only on Linux and
you need remote clients on the other platforms.

This updates the whatis document to hopefully clarify.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Mar 31, 2020
We've had comments in containers/podman#4364 that it's unclear
that we don't actually run Podman on Windows and Mac, rather it runs only on Linux and
you need remote clients on the other platforms.

This updates the whatis document to hopefully clarify.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Apr 16, 2020
We've had comments in containers/podman#4364 that it's unclear
that we don't actually run Podman on Windows and Mac, rather it runs only on Linux and
you need remote clients on the other platforms.

This updates the whatis document to hopefully clarify.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
rhatdan pushed a commit to containers/podman.io_old that referenced this issue Apr 16, 2020
We've had comments in containers/podman#4364 that it's unclear
that we don't actually run Podman on Windows and Mac, rather it runs only on Linux and
you need remote clients on the other platforms.

This updates the whatis document to hopefully clarify.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
@TomSweeneyRedHat
Copy link
Member

containers/podman.io#210 has merged fwiw

@abdennour
Copy link

still have same issue with this Mac:

image

should i upgrade ? or is it podman issue ?

~ podman version
Error: Get "http://d/v2.0.0/libpod/_ping": dial unix ///var/folders/4s/ch8k_58x04l59gv_p4jfq6lr0000gn/T/podman-run--1/podman/podman.sock: connect: no such file or directory

@balupton
Copy link

balupton commented Jan 6, 2021

Seems the issue has come back: https://stackoverflow.com/q/65590560/130638

> brew install podman
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 15 formulae.
==> Updated Casks
Updated 7 casks.

Warning: podman 2.2.1 is already installed and up-to-date
To reinstall 2.2.1, run `brew reinstall podman`

> podman search ubuntu
Error: Get "http://d/v2.0.0/libpod/_ping": dial unix ///var/folders/m8/rbkj8qcs29b3spxl9658d0dm0000gn/T/podman-run--1/podman/podman.sock: connect: no such file or directory

I'm running Big Sur 11.1 (20C69)

Here's my uname:

Darwin redacted 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

@balupton
Copy link

balupton commented Jan 6, 2021

never mind, user error, hadn't yet configured the remote client connection:

https://github.com/containers/podman/blob/master/docs/tutorials/mac_win_client.md

@ssbarnea
Copy link
Collaborator

ssbarnea commented Jan 6, 2021

Considering the number of users encountering this cryptic error, I would reopen this issue and assure that when we fail with it, we also print a descriptive message, maybe one with a link to documentation page.

@balupton
Copy link

balupton commented Jan 6, 2021

Considering the number of users encountering this cryptic error, I would reopen this issue and assure that when we fail with it, we also print a descriptive message, maybe one with a link to documentation page.

I'd also update https://podman.io/getting-started/ to have a section within Familiarizing yourself with Podman about the operating system support and the remote client called Operating system compatibility

As I think most people see installation part there, and be like, okay, nevermind, I've already got podman successfully installed via brew, so I don't need to look at that, and jump directly into the usage.

@afbjorklund
Copy link
Contributor

afbjorklund commented Jan 6, 2021

Or just make the error message look like Docker, then everyone would recognize it ? #7301 (comment)

Cannot connect to the Podman service at unix:///run/podman/podman.sock. Is the podman.service running?

For what it is worth, it is the same story on Linux (when you run the same program, podman-remote)

$ 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

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2021

How about
./bin/podman-remote images
Error: Cannot connect to the Podman socket. Is the podman service running?: Get "http://d/v2.0.0/libpod/_ping": dial unix ///run/user/3267/podman/podman.sock: connect: connection refused

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2021

Actually I like this better.
Error: Cannot connect to the Podman socket, make sure their is a podman service running.: Get "http://d/v2.0.0/libpod/_ping": dial unix ///run/user/3267/podman/podman.sock: connect: connection refused

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2021

#8915

@JudeNiroshan
Copy link

JudeNiroshan commented Aug 19, 2021

For some people like me who couldn't really understand why brew install podman didn't work, the answer is, there should be linux virtual machine in order to run the podman. So, what the official documentation suggesting is for all MacOS and Windows users to spin up a linux virtual machine and connect your podman with that VM. That VM is acting as a backend server for your podman program.

For MacOS users can simply run these commands which install podman + virtual machine program(qemu) to spin up a linux VM.

  brew install podman 
  brew install qemu 
  podman machine init 
  podman machine start

@rhatdan
Copy link
Member

rhatdan commented Aug 24, 2021

Where should we document this to make it easier to understand?

@rhatdan
Copy link
Member

rhatdan commented Aug 24, 2021

@ashley-cui @baude WDYT of adding a --now flag to podman machine init?

systemctl enable --now foo.service

Is what I base the idea on.

Then the instructions could be simplified to
brew install podman
brew install qemu
podman machine init --now

@kspendli
Copy link

kspendli commented Oct 3, 2022

i used below steps to resolve.

Removed podman brew uninstall podman
Removed containers files from the following directories:
rm -rf ~/.config/containers/
rm -rf ~/.local/share/containers

rm ~/.ssh/podman* related files
Reinstalled podman using brew brew install podman
Init the podman machine and start it.

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