首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >podman机器-无法在MacOS上连接到Podman

podman机器-无法在MacOS上连接到Podman
EN

Stack Overflow用户
提问于 2022-01-03 11:05:36
回答 2查看 6.6K关注 0票数 11

更新:这个问题已经解决了,请看答案.

我在MacOS上与podman machine一起使用podman machine,现在podman无法连接到podman machine

(它工作得更早,但不确定导致问题的新macOS版本)

MacOS蒙特雷(12.1)

代码语言:javascript
运行
复制
$ 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

$ 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

描述了您期望的结果:

期望得到podman版本和其他信息。

软件包信息:

代码语言:javascript
运行
复制
$ 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)
代码语言:javascript
运行
复制
$ sw_vers 
ProductName:    macOS
ProductVersion: 12.1
BuildVersion:   21C52
EN

回答 2

Stack Overflow用户

发布于 2022-01-22 02:34:53

多亏了Luap99

podman试图连接到$SSH_AUTH_SOCK地址,但这是失败的。

执行以下命令并解决问题。

代码语言:javascript
运行
复制
unset SSH_AUTH_SOCK
票数 7
EN

Stack Overflow用户

发布于 2022-09-07 21:05:21

我有个问题我用这个来解决

在这之后,一切都正确运行

代码语言:javascript
运行
复制
mkdir -p /Applications/Docker.app/Contents/Resources/cli-plugin

podman machine stop
podman machine rm -f
podman machine init --now
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70564828

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档