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

podman machine cannot bind to port on MacOS #13354

Closed
matt0x6F opened this issue Feb 25, 2022 · 10 comments
Closed

podman machine cannot bind to port on MacOS #13354

matt0x6F opened this issue Feb 25, 2022 · 10 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. machine

Comments

@matt0x6F
Copy link

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

/kind bug

Description

Podman machine is unable to bind to any port on MacOS

Steps to reproduce the issue:

  1. podman machine init

  2. podman machine start

Describe the results you received:

❯ podman machine start
INFO[0000] waiting for clients...
INFO[0000] listening tcp://127.0.0.1:7777
ERRO[0000] cannot listen: listen tcp 127.0.0.1:7777: bind: address already in use
Error: dial unix /var/folders/9d/gc3ttv6n19s6j3zytjsg0rym0000gp/T/podman/qemu_podman-machine-default.sock: connect: no such file or directory

Describe the results you expected:

Podman machine starts and binds to the port.

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

Podman and QEMU were installed via brew.

IDPS on  split-image-construction [$!?] via 🐍 v2.7.18 took 3s
❯ brew list podman
/usr/local/Cellar/podman/3.4.4/bin/podman
/usr/local/Cellar/podman/3.4.4/bin/podman-remote
/usr/local/Cellar/podman/3.4.4/etc/bash_completion.d/podman
/usr/local/Cellar/podman/3.4.4/libexec/gvproxy
/usr/local/Cellar/podman/3.4.4/share/fish/vendor_completions.d/podman.fish
/usr/local/Cellar/podman/3.4.4/share/man/ (160 files)
/usr/local/Cellar/podman/3.4.4/share/zsh/site-functions/_podman

❯ which podman
/usr/local/bin/podman

❯ ls -lah $(which podman)
lrwxr-xr-x  1 mouille  admin    33B Feb  7 12:18 /usr/local/bin/podman -> ../Cellar/podman/3.4.4/bin/podman

Output of podman version:

❯ 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: Connection to bastion host (ssh://core@localhost:54769/run/user/1000/podman/podman.sock) failed.: dial tcp [::1]:54769: connect: connection refused

Output of podman info --debug:

❯ podman info --debug
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: Connection to bastion host (ssh://core@localhost:54769/run/user/1000/podman/podman.sock) failed.: dial tcp [::1]:54769: connect: connection refused

Package info (e.g. output of rpm -q podman or apt list 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, 40.1MB) *
  Poured from bottle on 2022-02-07 at 12:18:17
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: 15,165 (30 days), 38,360 (90 days), 98,943 (365 days)
install-on-request: 15,156 (30 days), 38,353 (90 days), 98,931 (365 days)
build-error: 8 (30 days)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

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

Physical / QEMU

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 25, 2022
@matt0x6F
Copy link
Author

A little more info, it looks like this thing is what's holding the port:

❯ lsof -i tcp:7777
COMMAND  PID    USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
gvproxy 1274 mouille   10u  IPv4 0xc2fd9c38b0727283      0t0  TCP localhost:cbt (LISTEN)

@matt0x6F
Copy link
Author

I was able to successfully kill it with lsof -t -i tcp:7777 | xargs kill. While my issue is fixed, this seems like an issue.

@baude
Copy link
Member

baude commented Feb 26, 2022

I would suspect a zombied process of gvproxy was already running.

@baude
Copy link
Member

baude commented Feb 26, 2022

im guessing after you got it working, you didnt see it again? if that isnt the case, you need to give us a better reproducer.

@Luap99
Copy link
Member

Luap99 commented Feb 26, 2022

This is fixed in podman v4.0 since it will no longer bind a port on the host at startup.

@Luap99 Luap99 added the machine label Feb 26, 2022
@matt0x6F
Copy link
Author

matt0x6F commented Mar 2, 2022

Yes, once I killed it things were fine. When is a 4.0.x release expected to HomeBrew?

@rhatdan
Copy link
Member

rhatdan commented Mar 2, 2022

Hopefully this week or next. We are trying to get first volume support in.

@matt0x6F
Copy link
Author

matt0x6F commented Mar 2, 2022

@rhatdan Awesome! Are there any open meetings or office hours we can attend? We're starting to become fairly heavy users of Podman, I think it makes sense to have someone attend these meetings if there are any.

@rhatdan
Copy link
Member

rhatdan commented Mar 2, 2022

@Luap99
Copy link
Member

Luap99 commented Mar 21, 2022

4.0.2 is in homebrew, this is fixed

@Luap99 Luap99 closed this as completed Mar 21, 2022
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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. machine
Projects
None yet
Development

No branches or pull requests

4 participants